/Battleships-AI---Swift-Playground

Teaching resource for early stages of Swift Programming.

Primary LanguageSwift

Battleships-AI---Swift-Playground

This Swift Playground has been developed in Xcode 8.3. It was my scholarship applciation submission for Apple's WWDC 2017. It may a useful teaching resource for teaching early stages of programming. The user is given some pre-implemented methods that they can improve upon. It gives the student the freedom to get creative by developing an robot user to play Battleships.

A number of bots are included in the playground for the user to play against:

  • SequentialAI - Attacks the board in order A1, B1..J1, A2, etc.
  • RandomAI - Attacks random squares each move
  • RandomSeekAI - Attacks random squares each move, but attempts to seek and destroys a ship once one has been hit