Skip to content

Latest commit

 

History

History
49 lines (24 loc) · 1.46 KB

README.md

File metadata and controls

49 lines (24 loc) · 1.46 KB

snake-race-thread-concurrency

My image

A variation of the popular game Snake using multi-snake threads moving against things to practice concurrency

Project made during 2nd Year of graduation for the class - Concurrent and Parallel Programming

Instructions

You don't need to do anything, just watch snakes randomly battling against each other.

If you want to control a snake just Mouse-Right-Click it to select and Mouse-Left-Click in a Cell to make her move to its destiny.

There are 4 Special items on the board that Snakes can interact with:

Food
  • Grabing a rat makes your Snake grow 3 cells.
Jump Pad
  • Getting a jump pad makes your Snake able to walk through other objects/snakes.
Barrier
  • Crashing against a barrier will kill your Snake
Turbo Boost
  • Getting a Turbo Boost will make your Snake move 3 times as fast.

Snakes finish the "race" when they reach the opposite of the Board from where they Spawned.

Detailed instruction can be found in 'The Snake Race - Instrucoes.docx' & 'The Snake Race - Relatorio.docx' (both in Portuguese)

How to run

/SnakeRace/src/snakepackage/SnakeApp.java is where the main method is.

Left to do

Need to refactor the code, many parts are messy. It works but it isn't very effective.

More documentation & comments to ease cleaning code.

Some OOP rules (Visibility/Encapsulation) are not being followed because it wasn't the focus on this subject, I should fix that.