Skip to content

isanzzi/hades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hades Game

Hand Destroyer is a turn based scissor game

Installation

For Users

🔗 Download HandDestroyer v1.1

For Developers

Option 1: Using build_simple.bat (Windows)

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the build script:
    build_simple.bat
  4. The compiled executable will be created in the dist folder

Option 2: Compile and Run with Python

Windows
# Create and activate virtual environment
python -m venv venv 
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python main.py
Linux
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python main.py

System Architecture

Battle System Flowchart

flowchart TD
    %% HeroSelection Class
    HS_init[HeroSelection.__init__] --> HS_initUI[HeroSelection.initUI]
    HS_initUI --> HS_toggle[HeroSelection.toggle_pvp_mode]
    HS_initUI --> HS_click[HeroSelection.on_hero_clicked]
  
    HS_click -- "selected_hero" --> HS_update[HeroSelection.updateHeroInfo]
  
    HS_update --> isPVP{Is PVP mode?}
  
    isPVP -- "Yes" --> HS_firstSelect{player selected?}
    HS_firstSelect -- "player1" --> HS_storeP1[Store Player 1 Hero *convert_to_battle_hero]
    HS_storeP1 --> HS_click
  
    HS_firstSelect -- "player1&2" --> HS_convert[HeroSelection.convert_to_battle_hero]
    HS_convert -- "hero and enemy objects" --> HS_select[HeroSelection.on_select_hero]
  
    isPVP -- "No" --> HS_convert_pve[HeroSelection.convert_to_battle_hero]
    HS_convert_pve -- "1 hero data" --> HS_randomEnemy[Create random enemy hero]
    HS_randomEnemy -- "hero and enemy objects" --> HS_select
  
    HS_select -- "player_hero, enemy_hero, is_pvp" --> MF_init[MainFightWindow.__init__]
  
    %% MainFightWindow Initialization
    MF_init --> MF_initUI[MainFightWindow.initUI]
    MF_initUI --> MF_find[MainFightWindow.find_character_labels]
  
    %% Battle Flow - Simplified
    MF_init --> isPvPMode{Is PVP mode?}
    isPvPMode -- "Yes" --> MF_timer[Start Turn Timer]
    isPvPMode -- "No" --> UI_action[Wait for User Action]
    MF_timer --> UI_action
  
    %% Connect UI action to handle_turn
    UI_action -- "player_action" --> MF_turn[MainFightWindow.handle_turn]
  
    MF_turn --> storePAction[Store Player Action]
    storePAction --> pvpCheck{Is PVP?}
    pvpCheck -- "Yes" --> firstTurnCheck{First turn?}
    firstTurnCheck -- "Yes" --> switchTurn[Switch to Player 2]
    switchTurn --> waitP2[Wait for P2]
    waitP2 --> UI_action
  
    firstTurnCheck -- "No" --> whoseTurn{Whose turn?}
    whoseTurn -- "Player 1" --> switchTurn
    whoseTurn -- "Player 2" --> process[Process Both Actions]
  
    pvpCheck -- "No" --> cpuAction[Generate CPU Action]
    cpuAction --> process
  
    process -- "player_action, enemy_action" --> MF_anims[Handle Animations]
  
    %% Show basic animation queue process
    MF_anims -- "animation_type, is_player" --> MF_process[Queue Animation]
    MF_process --> MF_update[Update Battle UI]
  
    %% Battle End Check
    MF_update --> MF_check{Battle Ended?}
    MF_check -- "Yes" --> MF_end[Handle Battle End]
    MF_check -- "No" --> UI_action
  
    %% Action Methods
    actionGroup[Battle Actions] -- "action type" --> MF_turn
  
    %% Add pause flow
    UI_action -- "pause" --> MF_pause[Handle Pause]
    MF_pause --> PauseMenu[Pause Menu]
    PauseMenu -- "resume" --> UI_action
Loading

handle turn

battleflow

Screenshots

Hero Selection

Hero Selection Screen

Battle Screen

Battle Screen

Pause Menu

Pause Menu

Contributor

Team Members

  • Ihsan - 241524048
  • Arkan - 241524033
  • Fauzi - 241524042
  • Hana - 241524045
  • Rifqi - 241524055

About

Hand Destroyer is a turn based rock paper scissor game

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5