Skip to content

Latest commit

 

History

History
221 lines (202 loc) · 9.5 KB

archive-readme.md

File metadata and controls

221 lines (202 loc) · 9.5 KB

DuelFX


A Duel - based card game that were created using JavaFX. Similar to how duel monster game works, but you will play with avatar character ^^

Code Structure

CardGameOOP
├───src
├───main
    ├───java
    |   └───com.avatarduel
            └───dao
                └───CardDAO.java
                └───CSVCardDAO.java
            └───event
                └───ActivateDestroyEvent.java
                └───ActivateSkillEvent.java
                └───AttackEvent.java
                └───ChangePositionEvent.java
                └───DirectAttackEvent.java
                └───DrawEvent.java
                └───EndTurnEvent.java
                └───IEvent.java
                └───NextPhaseEvent.java
                └───PlayLandCardEvent.java
                └───RemoveSkillCardEvent.java
                └───SummonEvent.java
            └───exception
                └───ExceptionCause
                    └───AttackCause.java
                    └───AttackOnTheCreatedTurncause.java
                    └───ExceptionCause.java
                    └───FullBoardCause.java
                    └───InvalidPhaseCause.java
                    └───InvalidTargetCause.java
                    └───MultipleAttackOnTheSameTurnCause.java
                    └───MultipleLandCardPlayedOnTheSameTurnCause.java
                    └───NoCharacterCardInFieldCause.java
                    └───NoCharactercardToDestroyCause.java
                    └───NotEnoughPowerCause.java
                └───EmptyFieldException.java
                └───InvalidAttackException.java
                └───InvalidOperationException.java
                └───InvalidPhaseException.java
                └───InvalidTargetException.java
                └───NotEnoughPowerException.java
                └───NotEnoughSpaceException.java
                └───UniquePlayCardException.java
            └───factory
                └───CardFactory.java
                └───CardInFieldFactory.java
            └───guicontroller
                └───Board
                    └───BoardController.java
                    └───DeckController.java
                    └───FieldController.java
                    └───GameStatusController.java
                    └───HandController.java
                    └───PlayerStatusController.java
                └───Card
                    └───CardController.java
                    └───CardInFieldController.java
                    └───CardInHandController.java
                    └───CharacterCardInFieldController.java
                    └───DisplayCardController.java
                    └───SkillCardInFieldController.java
                └───MainMenu
                    └───CardLibraryController.java
                    └───HowToPlayController.java
                    └───MainMenuController.java
                └───RenderQuest
                    └───AttackRequest.java
                    └───ChangeTurnRenderRequest.java
                    └───CheckWinRequest.java
                    └───DeckDrawAndRenderRequest.java
                    └───DeckRenderRequest.java
                    └───FieldRenderRequest.java
                    └───GameStatusRenderRequest.java
                    └───HandRenderRequest.java
                    └───PlayerStatusRenderRequest.java
                    └───RenderRequest.java
                    └───ShowSelectedCardRequest.java
            └───model
                └───card
                    └───Card.java
                    └───CardInHand.java
                    └───CharacterCard.java
                    └───CharacterCardInField.java
                    └───IField.java
                    └───LandCard.java
                    └───SkillAuraCard.java
                    └───SkillCard.java
                    └───SkillCardInField.java
                    └───SkillDestroyCard.java
                    └───SkillPowerUpCard.java
                └───player_component
                    └───Deck.java
                    └───Field.java
                    └───Hand.java
                    └───Player.java
                    └───PowerManager.java
                └───type
                    └───CardType.java
                    └───CharacterState.java
                    └───Element.java
                    └───Phase.java
                    └───PlayerType.java
                └───Game.java
            └───phase
                └───BattlePhase.java
                └───DrawPhase.java
                └───EndPhase.java
                └───IPhase.java
                └───MainPhase.java
            └───util
                └───CSVReader.java
                └───Loader.java
            └───AvatarDuel.java
            └───Main.java
    └───resources
    |   └───com.avatarduel
           └───card
                └───border
                    └───air.jpg
                    └───fire.jpg
                    └───water.jpg
                └───data
                    └───character.csv
                    └───land.csv
                    └───skill_aura.csv
                    └───skill_destroy.csv
                    └───skill_power_up.csv
                └───icon
                └───image
            └───character
                └───kira_yoshikage.png
                └───Light_Yagami.png
            └───GUI
                └───Board
                └───Card
                └───Main Menu
                └───Popup
            └───music
                └───main_menu_song.mp3
└───test
    └───java
        └───com.avatarduel
            └───dao
            └───event
            └───exception
            └───factory
            └───model
            └───phase
            └───util
                └───LoaderTest.java

How To Compile & Run

Requirements

  1. Download and Install Java 8 (JDK 1.8) here

How to Run

Here is an example of project using gradle as the build tools. Try running these commands in your terminals :
Linux :

./gradlew run

Windows :

gradlew run

You will notice that it will open a window that display 'Avatar Duel'. In the command line you can see the data that is being read by CSVReader.java

What happen is when you use ./gradlew run, it will start the main function in your app. For this app, the main function lives in AvatarDuel.java.

You can explore more about gradle here

APPLICATION

Here are fews examples of how the game looks

Main Menu

  • Main Menu

Character that use in field

  • Character that use in field

Playing the cards from hand

  • Playing the cards from hand

Player description and Card Description

  • Player description and Card Description

Defense Position

  • Defense Position

Error Message

  • Error Message

Pop up to use some skills

  • Pop up to use some skills

Skill Card In Use

  • Skill Card In Use

Game Status and End Button

  • Game Status and End Button

A Win Message

  • A Win Message

Credit

All images and description are taken from Avatar Wikia

Contributor