Skip to content

This is a little game involving two robots on a battlefield. The aim of the game is to control the robot's movement using a combination of L, R and M commands and step over the opponent's robot.

pascalhow/RobotWars

Repository files navigation

RobotWars

Instructions

  1. The application has been built against .Net Framework 4.0 in Visual Studio 2015
  2. Download the RobotWars repository with all the contents and run the Project Solution: RobotWars.sln
Example - Setup Page

alt tag

Instructions

  1. Upon launching the Robot Wars application, the user is presented with the Setup page to configure the robots (See image above)
  2. Adjust the grid width and grid height to configure the dimensions of the arena. The size of the arena can vary from 1x1 up to 10x10
  3. Position Robot 1 and Robot 2 on the field by entering their x, y coordinates and orientation (N, S, E, W)
  4. (Optional) Enter a first move for each robot. The robots only accept L, R and M commands
    L - Rotate counter clockwise on the spot
    R - Rotate clockwise on the spot
    M - Move in the direction the robot is facing by 1 unit
    For eg: If the robot is facing north, command "LMLMLMLMM" results causes it to move north by 1 unit
    Note: If the robot hits the boundary of the arena on an 'M' command, it will not move forward. It will then proceed with the next instruction in its "Planned Move" command string
  5. Click the initialise button and the Message Centre textbox will provide information on the new robot starting position if a First move command was entered
  6. Click "Go!" button to then proceed to the battlefield (See image below)
Example - Battlefield

alt tag

Instructions

  1. The grid on the left represents the battlefield. The robots are positioned according to the way they were configured on the setup page
  2. Each robot takes turn to accept user commands (L, M and R) to move on the battlefield. Robot 1 (Red) starts first
  3. Enter the commands in the Planned Move textbox. The textbox accepts a maximum of 10 characters for fairness as this is a scoring game
  4. A robot earns a point if during its turn, it lands exactly on the other robot
  5. The first to reach 5 points wins the battle

About

This is a little game involving two robots on a battlefield. The aim of the game is to control the robot's movement using a combination of L, R and M commands and step over the opponent's robot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages