Skip to content

nurekeshka/BattleCardGame

Repository files navigation

University of Europe: Java Backend Development

Final Project of Second Semester – "Battle" Card Game

Project Description

The purpose of this project is to develop a Card Game program with a Graphical User Interface that the Player can play with the Computer or other player. The program will be written in Java and should have a user-friendly graphical user interface to enhance usability, in addition to save and capability, so the user can continue the game from where he finished.

Installation

For running this repository project you will need following:

  1. Java Programming Language (JDK of 20)
  2. Gradle Build Tool

Game Rules

1. Introduction

War (also known as Battle in UK) – is a simple card game, typically played by two players using a standard playing card deck, and often played by children.

2. How to play

  • The objective of the game is to win all of the cards.
  • The deck is divided evenly and randomly among the players, giving each a down stack. In unison, each player reveals the top card of their deck -this is a "battle"- and the player with the higher card takes both of the cards played and moves them to their stack. Aces are high, and suits are ignored.
  • If the two cards played are of equal value, then there is a "war". Both players place the next 2 cards from their pile face down and then another card face-up. The owner of the higher face-up card wins the war and adds all the cards on the table to the bottom of their deck. If the face-up cards are again equal then the battle repeats with another set of face-down/up cards. This repeats until one player's face-up card is higher than their opponent's.
  • If a player runs out of cards during a war, that player immediately loses. In others, the player may play the last card in their deck as their face-up card for the remainder of the war or replay the game from the beginning.
  • The game will continue until one player has collected all of the cards.

3. Solution Steps

  1. Create Packages:
    • You need at least 2 main packages
  2. The solution must be OOP including these:
    • Card class
    • User class (players, name and id)
    • Save class (save game progress)
  3. In each class you have to:
    • Constructors
    • Getter and setters
    • Print info
    • Needed methods
  4. You save the game progress

4. The Solution condition

The solution must has the following conditions (Not following the following conditions you will have penalties of each points):

  1. Based on OOP, no static methods are allowed, except of Lambda Function if needed. (20 points penalty)
  2. All variables must be private, (4 point penalty)
  3. Uses inheritance, and abstract in the solution (4 points penalty).
  4. Uses Array or list to save the data (4 points penalty).
  5. Uses file saving to save the game progress, (4 points penalty).
  6. Uses the random number to shuffle and distribute the card deck, (4 Points penalty).
  7. Use an Array or list to save the user's information. (2 points penalty).
  8. Using a Graphical User interface controlled by a mouse or Keyboard, (20 Points penalties),
  9. The GUI muss had a menu bar which had at least the following (New) for the new Game, (Save) for saving the Game, (Open) to open the saved game. (5 points penalties)
  10. Code must have comments, (2 Points penalties),
  11. Code must not be copied, or AI generated (50 Points penalties).
  12. UTF 8 character coding (1 point penalty).
  13. Project muss show your names, in the about Menu Bar, (2 point penalty).
  14. All used images muss be included in the Images folder, in your Project.
  15. You can add sound effects if you would like to game.
  16. You can download card images from the Internet or create your design.
  17. There is no pre-defined design of how the game will be at the end, the winning group game will be given 10 extra points.

Please save Java programs that:

  1. Create a project called YourProject Number
  2. Please prepare a power point Presentation including, your name and Construction for each student,
  3. Write your group names in the code

5. Submission and Presentation

Please write a Java program that contains the following information you include in your reports the following points:

  1. Please submit your homework as a zip file before 11 July at 11:00 AM using the team upload link in your MsTeam account, any submission by email later submission will be not counted.
  2. Please include an exe version of your game, included in the zip file.
  3. All the images must be included.

6. Notes

  1. This project is a group project, each student has to contribute to coding in the project,
  2. Nonworking program or failure in submission on time will get zero.
  3. Please do not uses AI systems (ChatGPT, Bard, Bing, …), any used will got zero and fail attempt
  4. Please upload your project in the assignment under your group name in MsTeam.

About

Java Backend Development Final Project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages