{"id":15489745,"url":"https://github.com/damilolasodiq/battlefield","last_synced_at":"2026-02-11T07:03:03.801Z","repository":{"id":98928617,"uuid":"110519713","full_name":"damilolasodiq/battlefield","owner":"damilolasodiq","description":"A battlefield game implemented in java (console) for learning and educational purposes.","archived":false,"fork":false,"pushed_at":"2020-10-13T00:49:54.000Z","size":226,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-31T10:43:16.828Z","etag":null,"topics":["game","multiplayer","player","soldiers","weapons"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/damilolasodiq.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}},"created_at":"2017-11-13T08:18:34.000Z","updated_at":"2020-05-12T10:45:01.000Z","dependencies_parsed_at":"2023-03-22T02:47:21.297Z","dependency_job_id":null,"html_url":"https://github.com/damilolasodiq/battlefield","commit_stats":{"total_commits":48,"total_committers":2,"mean_commits":24.0,"dds":"0.16666666666666663","last_synced_commit":"a3d869d4fb3b576d0ade4d8243141e1805e221d2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/damilolasodiq/battlefield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damilolasodiq%2Fbattlefield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damilolasodiq%2Fbattlefield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damilolasodiq%2Fbattlefield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damilolasodiq%2Fbattlefield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/damilolasodiq","download_url":"https://codeload.github.com/damilolasodiq/battlefield/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/damilolasodiq%2Fbattlefield/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29329492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["game","multiplayer","player","soldiers","weapons"],"created_at":"2024-10-02T07:07:32.551Z","updated_at":"2026-02-11T07:03:03.785Z","avatar_url":"https://github.com/damilolasodiq.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/damilolasodiq/battlefield/badge.svg)](https://coveralls.io/github/damilolasodiq/battlefield)\n[![Build Status](https://travis-ci.org/damilolasodiq/battlefield.svg?branch=master)](https://travis-ci.org/damilolasodiq/battlefield)\n\nAbout the Game\n--------------\nThe Battlefield game is an interesting console game designed to emulate 2 nations at war.\nAs a player, you can choose between a multi-player mode or a CPU simulated mode (single player).\n\nWhen the game starts, each player is given a battle area **(N x M matrix)** with a representation of Soldiers. There are 3 type of Soldier and the number and type of Soldiers a Player get is based on the current game currentLevel\n\n    C - Corporal\n    S - Sergeant\n    G - General\n\nThere are 3 categories of weapons in the game;\n \n    Pistol\n    Shotgun\n    Bazooka\nA Soldier can only use weapons according to their ranks.\nFor example, a Corporal can only use a Pistol, a Sergent can use a Pistol and a Shotgun while a General can use any of the 3 weapons.\n\nFor a CPU simulated mode, the computer randomly selects a name from some list of TRANSFORMER names.\nFor every currentLevel, each player is assigned the same number of soldiers, weapons and arsenal.\n\nSetting up the game\n-------------------\nPerquisite: Ensure you have java \u003e=1.8 runtime installed in your environment. You also need to install **[git](https://git-scm.com/downloads)** and **[maven](https://maven.apache.org/download.cgi\n)** to run the commands for setup.\n1)  Clone this repository\n```\ngit clone https://github.com/damilolasodiq/battlefield\n```\n2)  Goto the directory where the repository is created and run the command;\n```\nmvn clean install\n```        \nHow to play\n-----------\n1) Open a command line terminal on your Mac or PC and run the command below from the location you cloned the repository;\n\n```java\n\njava -jar target/Battlefield-1.0-SNAPSHOT.jar BattleFieldGameLauncher\n```        \n\n2) After reading this instructions, you would follow subsequent instructions on the screen to set a game mode (CPU or multi-player)\n3) You will be required to enter a name for your character e.g John, Xavi, Elixir e.t.c\n4) You can type **`PAUSE`** at any time during a game play to pause the game.\n5) The currentLevel information, current player name and health status of both players are shown on the top of the screen at everytime\n6) You can type **`STAT`** at any moment in the game to check your full stat such as number of Soldier killed, number of soldiers injured,\nnumber of points, inventory of your arsenal and so on.\n7) To launch an attack, you need to specify the position of your Soldier to carry out the attack to also a position in the battle area\nof your opponent where the attack your be carried out. For example, you type 0134 to select your Soldier at row 1 col 0 to carry out\nan attack on row 3 col 4 in the opponent's battle area.\n8) For every attack, you can see the effect on the enemies field.\n    `X` means your attack hit a position without a Soldier in which case, you don't get a point but your Soldier weapon loses a bullet.\n    `!` means your attack hit a Soldier on the enemies field and the Soldier died.\n    `-` means a position on the battle field that is yet to be explored.\n9) Every Soldier type has a range they can shoot for example, a Corporal cannot shoot as far as a Sergeant and a Sergeant cannot shoot as wide as general\n10) If a Soldier tries to shoot to a point on the enemy's area where his cannot reach, his weapon reduces by a round but there's no effect on the enemies field\nand hence, no point awarded.\n11) You can view this instruction anytime during a game play by typing **`HELP`**\n12) To End the game, type **`QUIT`** or **`EXIT`** at any time.\n\n\nHow points are calculated\n-------------------------\n1)  Anytime you attack an opponent's area that does not have a Soldier or you shoot an area that is out of range or you shoot an already blasted area,\nyou do not get a point, yet your weapon reduces by a round\n2)  Depending on the Weapon used to attack, a point is gained for every successful attack (i.e when your a players soldier is able to hit another player's solder)\nHowever, an additional point is awarded whenever a junior ranked officer kills a higher ranked officer e.g when your Corporal hits your enemy's General or Sergent\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamilolasodiq%2Fbattlefield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdamilolasodiq%2Fbattlefield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdamilolasodiq%2Fbattlefield/lists"}