Skip to content

A client that plays a game of 'Battleships' according to a ruleset when connected to a host server

Notifications You must be signed in to change notification settings

adstr123/Battleships-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship Bots - Year 1 University Project

Task

To create a bot that will take part in a battle royale against classmates on a server, written by the lecturer.

The bot is able to move around a large (500x500) grid at a constant rate, shoot at a constant rate and range, and detect other ships at a constant range. Networking code is provided, the task was to write battle instructions for the bot.

Assessment

BattleshipServer.exe is run on a central server. Students connect using the given credentials on the day, by changing parameters in the client code.

** I still have the server executable, but as it is compiled code I did not write, I'm not sure if it's OK to distribute it **

Student ships will then battle eachother on the grid, losing one point for every hit taken and gaining one point for every point of damage dealt. This will produce a ranking of ship tactics and grades will be distributed in accordance with this ranking.

BattleshipBot animated demo

Result

I got 62% - not too shabby for my first programming assignment!

Forking

It shouldn't be too difficult to write a server for this based on the screenshot from scratch by looking at the client code. If you actually want to do this and need help, contact me to discuss the server code I have!

About

A client that plays a game of 'Battleships' according to a ruleset when connected to a host server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published