Connect 4 - A Game

버전 1.0.0.0 (2.72 KB) 작성자: Humayun Kathuria
Good game for wasting one’s time. A very basic piece of code.

다운로드수: 1.9K

업데이트 날짜:2012/2/3

라이선스 보기

The game-store version of this game consists of a plastic rack with six horizontal rows and seven vertical columns. Each player has a number of “checkers”-type playing pieces. One player’s pieces are red; the other’s are black. The two players take turns putting a playing piece into a vertical column of their choice. The piece falls down that column under gravity until it stops against the bottom or against another piece. In this way the columns start to fill up. The object is to be the first player to connect four of her pieces. The four pieces may be lined up horizontally, vertically, or diagonally. When more than one game is played, players alternate taking the first turn.
For the computer game, we use matrix with six rows and seven columns displayed on the screen. The human player selects a column in which to place a piece. The computer program is responsible for updating the locations of the pieces. Programming the game display is not too time consuming, but programming a winning strategy is challenging.

인용 양식

Humayun Kathuria (2022).Connect 4 - A Game(//www.tianjin-qmedu.com/matlabcentral/fileexchange/34908-connect-4-a-game), MATLAB Central File Exchange. 검색됨.

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
태그태그 추가

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!