Giter Club home page Giter Club logo

connect4's Introduction

#Assignment 2 (50%)

##B.Sc.* Year 2, Algorithms 2013

###2. Connect 4

Develop a java program that simulates the popular game Connect 4. Connect 4 is a two player game in which the players take turns dropping coloured disks into a grid of seven columns by six rows. Please see here for more information and to understand fully the rules. Your program should have the following features:

Players will interact either via a console or graphical user interface (UI) that shows the current state of the grid after each go. See figures below for example UIs. The graphical based UI is more desirable. For each turn, the current player selects the column they wish to place their disk. They can only put disks in a column that is not full. Disks will occupy next available place in the column. The user(player 1) will take the first turn and the computer(player 2) will take the second turn.

After each turn, the program should check for the following:

  • A winner (four of the current players discs next to each other vertically, horizontally, or diagonally).

  • A draw (no winner and all columns full).

  • The board must be represented as a 2D array. The computer player skeleton class is here. You must NOT change the interface of this class however you must include your student number in the ComputerPlayer class name.

connect4's People

Contributors

ianmurphy1 avatar

Watchers

James Cloos avatar  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.