Compare commits

..

No commits in common. "51123ecd8e8adb226fcfd2973b8fdfcf08a288d8" and "542616cb0b158d97de0523c94e8a487b4f4fdfa8" have entirely different histories.

5 changed files with 22 additions and 15 deletions

View File

@ -22,7 +22,5 @@ jobs:
ls -al target/debian
UPLOAD_FILE=$(ls target/debian/*.deb)
curl --user jlusiardi:${{ secrets.UPLOAD_TOKEN }} --upload-file ${UPLOAD_FILE} https://gitea.intern.haus-in-hirschaid.de/api/packages/jlusiardi/debian/pool/bionic/main/upload
echo -e "${{ secrets.DEPLOY_PRIVATE_KEY }}" > /tmp/ssh_key
chmod 0600 /tmp/ssh_key
scp -o StrictHostKeyChecking=no -i /tmp/ssh_key ${UPLOAD_FILE} jlusiardi@april2023.lusiardi.de:/var/www/p17.lusiardi.de/el_diabolo
ssh -o StrictHostKeyChecking=no -i /tmp/ssh_key jlusiardi@april2023.lusiardi.de /var/www/p17.lusiardi.de/el_diabolo/generate_index.sh
echo ${DEPLOY_PRIVATE_KEY} > /tmp/ssh_key
scp -i /tmp/ssh_key ${UPLOAD_FILE} jlusiardi@april2023.lusiardi.de:/var/www/p17.lusiardi.de/el_diabolo

2
Cargo.lock generated
View File

@ -147,7 +147,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "el_diabolo"
version = "0.2.2"
version = "0.2.1"
dependencies = [
"crossterm",
"macros",

View File

@ -3,7 +3,7 @@ members = ["macros"]
[package]
name = "el_diabolo"
version = "0.2.2"
version = "0.2.1"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -10,7 +10,7 @@ impl Iterator for LevelLadder {
let current = self.curr;
self.curr = self.next;
self.next += current;
self.next = current + self.next;
// Since there's no endpoint to a Fibonacci sequence, the `Iterator`
// will never return `None`, and `Some` is always returned.

View File

@ -14,6 +14,7 @@ use crossterm::{
ExecutableCommand,
};
use ratatui::prelude::*;
use ratatui::widgets::block::{Position, Title};
use ratatui::widgets::{Block, BorderType, Borders, Wrap};
use ratatui::{
prelude::{CrosstermBackend, Terminal},
@ -31,12 +32,12 @@ mod constants;
mod game;
mod level;
mod level_generator;
mod level_ladder;
mod level_widget;
mod monster;
mod player;
mod position;
mod room;
mod level_ladder;
//
fn main() -> Result<()> {
@ -100,8 +101,10 @@ fn main() -> Result<()> {
height: map_area.height / 2 + 1,
};
let block = Block::default()
.title_top(
Line::from(format!(" {} ", game.get_player().get_name())).centered()
.title(
Title::from(format!(" {} ", game.get_player().get_name()))
.alignment(Alignment::Center)
.position(Position::Top),
)
.borders(Borders::TOP)
.border_style(Style::default().fg(Color::White))
@ -131,8 +134,10 @@ fn main() -> Result<()> {
};
// Display the latest messages from the game to the user
let block = Block::default()
.title_top(
Line::from(" messages ").centered()
.title(
Title::from(" messages ")
.alignment(Alignment::Center)
.position(Position::Top),
)
.borders(Borders::TOP)
.border_style(Style::default().fg(Color::White))
@ -214,8 +219,12 @@ fn main() -> Result<()> {
area.width = 40;
area.height = 20;
let block = Block::default()
.title_top(Line::from(" Game ended ").centered())
.title_bottom(Line::from("Press `q` to quit!"))
.title(
Title::from(" Game ended ")
.alignment(Alignment::Center)
.position(Position::Top),
)
.title(Title::from("Press `q` to quit!").position(Position::Bottom))
.borders(Borders::ALL)
.border_style(Style::default().fg(Color::White))
.border_type(BorderType::Rounded)