{"id":29615471,"url":"https://github.com/paasshme/shape-up-game","last_synced_at":"2025-07-21T00:03:33.970Z","repository":{"id":113426365,"uuid":"310555132","full_name":"paasshme/Shape-up-game","owner":"paasshme","description":"Board card game using java Swing and mutlithreading","archived":false,"fork":false,"pushed_at":"2021-03-17T10:04:43.000Z","size":30963,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-01T21:22:38.243Z","etag":null,"topics":["java","multithreading","swing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paasshme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-06T09:45:51.000Z","updated_at":"2022-05-04T02:36:23.000Z","dependencies_parsed_at":"2023-07-02T23:15:43.622Z","dependency_job_id":null,"html_url":"https://github.com/paasshme/Shape-up-game","commit_stats":null,"previous_names":["paasshme/shape-up-game"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/paasshme/Shape-up-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paasshme%2FShape-up-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paasshme%2FShape-up-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paasshme%2FShape-up-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paasshme%2FShape-up-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paasshme","download_url":"https://codeload.github.com/paasshme/Shape-up-game/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paasshme%2FShape-up-game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266217170,"owners_count":23894242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","multithreading","swing"],"created_at":"2025-07-21T00:03:33.390Z","updated_at":"2025-07-21T00:03:33.942Z","avatar_url":"https://github.com/paasshme.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shape Up Game\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme_res/main_menu.png\" width=500\u003e \n\u003c/p\u003e\n\n## Introduction\n\nAs part of a course at UTT, we had to program a game using OOP in Java. The game is called Shape Up and it is a board game using cards. The game can be played by 2 to 3 players.  The goal is to have the best score, calculating from the different alignments of cards which have the same characteristics.\nA card has 3 characteristics: Shape, Color and Filling.  \u003cbr\u003e\u003cbr\u003e\n\u003cimg src=\"readme_res/card_blue_circle.gif\" width=75\u003e\n\u003cimg src=\"readme_res/card_red_circle.gif\" width=75\u003e\n\u003cimg src=\"readme_res/card_green_square.gif\" width=75\u003e\n\u003cbr\u003e \u003cbr\u003e\nThe detailed rules can be found here: http://goodlittlegames.co.uk/games/06-shape-up.html  \nAs well as the subject, which is in French: https://moodle.utt.fr/pluginfile.php/22853/mod_resource/content/3/PROJET%20LO02.pdf \n\nTo create the game, we decided to change the graphic charter in creating ourselves cards. To make this, we called upon a friend, Thomas Durand who is graphist to create the background, buttons and cards of the game. The idea was to represent stones which make an hologram appear when we put it on the table. So cards are represented by holograms, that’s why you can see it sizzle.\nThe game’s music was made by another friend, Marceau Canu, who is a music producer.\n\n## Installation: \nJava 14+ is required in order to play the game, you can find it here: https://jdk.java.net/  \nYou can install the game by downloading the jar file here: https://github.com/JacquesMironneau/Shape-up-game/releases  \n\nThe game is then executable with a mere double click or via a terminal with the  \n```$ java -jar ShapeUpGame.jar```  \nIf the game is launched via the desktop, only the HMI view will be displayed (the game will not be playable in terminal and hmi simultaneously).\n\n## Repository organisation:  \n.  \n├── **doc/**: javadoc, diagrams and project report (fr)  \n├── **res/**: project ressources (tiles, cards, holograms, music)  \n├── **readme_res/**: readme ressources (screenshot, gifs)  \n└── **src/**: java sources files  \n\n## User informations\n### Set up the game\nTo play this game, you have to first set up the game. There are several menu pages in order to set up the game. First you choose the game mode, you have 3 modes:\n- Normal mode, which follows the official rules of Shape Up.\n- Advanced mode, which follows the official rules of Shape Up.\n- No Adjacency mode, which is a mode that we created, it’s just allowed to remove adjacency rules, then you can put a card on the board without checking if the card has another card adjacent.\n\nThen you have to choose one way to calculate the score, you have 2 choices:\n- Normal Calculator, which follows the official rules of ShapeUp.\n- Bonus Calculator, which is a way to calculate the score we invented, it allows more points for big alignments.\n\nThen you choose one shape of board, you have the choice between 3 shapes:\n- Square, which is actually a rectangle, which follows the official rules of Shape Up.\n- Triangle, which is an additional form we imagined.\n- Circle, which is an additional form we imagined too.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme_res/circle_board.png\" width=400\u003e \u003cimg src=\"readme_res/rectangle_board.png\" width=400\u003e  \n\u003c/p\u003e\n\n\nThen you have to set up players. You can choose 2 to 3 players. A player can be Virtual or Real. If you choose one real player, you just have to give him a name. If you choose one virtual player, you have to choose his difficulty between 2: Normal and Difficult.   \nYou can’t choose more than 3 players or less than 2.  \nAfter this, you have finished setting up the game and you’re ready to play !  \n\u003cbr\u003e\u003cbr\u003e\n### Play a turn\nWhen you’re playing, you have two action’s choices: **Move** a card or **Place** a card.\n- To place a card, you have to drag a card from your hand to available positions which appear when you click on the stone. \n- To move a card, it’s quite similar, you have to drag a card from the board to another available positions which appear when you move the stone.\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme_res/normal_turn.gif\" width=400\u003e \u003cimg src=\"readme_res/advanced_turn.gif\" width=400\u003e\n \u003cp\u003e\n\u003cbr\u003e\u003cbr\u003e\nWhen you want to finish your turn, after having placed a card, and moving or not a card, you just have to click on the button “End Turn”, then it’s time for the next player to play !  \n\nAt the end of the round, a score page appears and you see who won the round. A game is composed of 4 rounds.  \n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"readme_res/scores.png\" width=400\u003e\n\u003c/p\u003e\n\n## Technical implementation\nFor this project we have used the SWING library and implemented several design patterns.  \n\n- We first use MVC pattern to separate the logic from the view of the application. Every user action is given to a controller which then changes the state of the model. Next, the model notifies the views (using the Observer pattern) that its state has changed. \nAccording to the specification, the game must be playable using terminal and GUI at the same time. Thus, the user can decide to start an action on its terminal and then move to the HMI. We have therefore made a custom scanner class which is interruptible (contrary to the Scanner class), our controller supports concurrency and allows the user to play with the chosen view.  \n\n- For this project we have realized unit testing using the JUnit framework. Since our model quickly grows in complexity (with the addition of different boards, score calculator and game versions) we realized a robust test suite to cover the different game scenarios.  \n\n- We also used the Visitor pattern to dissociate the score calculation from the board in itself. At the end of a turn, the calculator visits the board and then proceeds to the player score calculation.  \n\n- The last pattern we used is the Strategy one. We used it to implement different strategies for the virtual players. A virtual player might use an easy or a hard strategy depending on the game set up.  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaasshme%2Fshape-up-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaasshme%2Fshape-up-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaasshme%2Fshape-up-game/lists"}