Code Monkey home page Code Monkey logo

eecs-448-project-2's Introduction

Project 2: Battleship with AI opponents

Group 17 - EECS 448

This program contains a battlship game written in JavaScript. For best experience, run the game in the Safari browser. The game allows for a tradtional two player game or the option to play against an Easy, Medium, or Hard AI opponent.

Welcome to Battleship!

This game allows for players to choose whether they would like to play against a computer opponent or a friend. It then allows the player to choose the number of ships to play with (1-6), and asks the player(s) to place the ships. After all ships have been placed, players will take turns attacking their opponents ships. Attacks are sent by typing in the coordinate of the desired attack, if playing against the computer attacks are sent after player 1 sends their attacks. While playing the game, players will have the ability to view their own board as well as the ability to view the attacks that they have sent on the opponents board. Once a player or computer has sunk all of the other players ships, the game will end and the program stops running.

AI Requirements:

For the AI component there will be three levels of difficulty. All AI will place their ships randomly with a legal ship placement.
  1. Easy: It just fires randomly every turn.
  2. Medium: It fires randomly until it hits a ship then fires in orthogonally adjacent spaces to find other hits until a ship is sunk.
  3. Hard: Cheater, cheater pumpkin eater! This mode knows where all your ships are and lands a hit every turn.

Custom Requirement:

In addition to the AI requirments added, the game now includes background music as well as noises indicating a hit, miss, and game over.

File Explainations:

  • Documentation: This folder contains the proper jsdoc documentation in HTML format, works cited, previous groups design paradigm, explaination of custom artifact, and time logging for the project
  • eecs448project1: This folder contains the files that make up the game - index.html, style.css, and script.js. It also contains a Music folder where the sounds can be accessed
  • Archive: This folder contains the previous groups (Group 6) documentation and artifacts

User Instructions:

To play the Battleship game you first need to download the zip file. Once the file has been downloaded, open the eecs448project1 folder from your downloads folder and open the index.html file. This will take you to a new browser window where the game will be played. Once the html file is opened, follow the instructions on the screen.

eecs-448-project-2's People

Contributors

reganjanssen avatar codemagic4ever avatar andrewloaiza avatar njshirley avatar eric1833 avatar rajnara avatar brown28andrew avatar january avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.