Skip to content

a drawing program that displays and animates a robot moving around an arena of any shape surrounded by a solid wall

Notifications You must be signed in to change notification settings

eceokutan/miniRobotExplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Robot Explorer

This repository contains two C programs: game.c and robot.c.

game.c

game.c is a simple game program. This file performs the graphics modifications and game logic. To explore the map, the program employs Depth-First Search algorithm.

robot.c

robot.c is a program that simulates a robot's movements.

Change the game

You can change these values! in game.c

  • WINDOW_HEIGHT (make sure height and width is a multiple of 25)
  • WINDOW_WIDTH
  • totalMarkerCount
  • totalObstacleCount
  • randomizedArena -> make "true" if you want a completely randomized arena and "false" if you want the game to run with pre-determined values.
  • also feel free to change the constant values at randomArena() function to increase or decrease the percantage of obstacles and markers present!

You can change these values! in robot.c

  • sleepTime -> decrease to make robot move faster, increase to make it move slower.

How to Compile

To compile game.c, use the following command:

clang game.c robot.c ../drawapp-4.0/graphics.c -o game

How to Run

To run the compiled robot program, use the following command:

./game | java -jar ../drawapp-4.0/drawapp-4.0.jar  

Author

Ece Okutan

About

a drawing program that displays and animates a robot moving around an arena of any shape surrounded by a solid wall

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages