Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rileygramlich/connect-four-by-GPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect Four

Assembled by rileygramlich


Description and Background Info:

Connect Four is a classic two-player strategy game where players take turns dropping colored discs from the top into a vertically suspended grid. The objective of the game is to be the first player to get four of their own colored discs in a row, either vertically, horizontally, or diagonally.

Screenshots:

To come!

Technologies Used:

The game was developed using TypeScript, HTML, CSS, and DOM manipulation.

Chat GPT

ChatGPT: an advanced language model developed by OpenAI, capable of generating human-like text, answering questions, and writing code. ChatGPT was used to generate the code for this Connect Four game.

TypeScript

TypeScript is a statically typed programming language that is a superset of JavaScript. It adds features such as classes, interfaces, and type annotations to JavaScript and can be used to write scalable and maintainable applications. TypeScript was used to develop the game logic and render the game board on the web page.

HTML

HTML (HyperText Markup Language) is used to structure the content of the game board and provide the user interface.

CSS

CSS (Cascading Style Sheets) was used to style the HTML elements of the game board, such as colors and size of the cells and rows.

DOM manipulation

The Document Object Model (DOM) is a programming interface for HTML and XML documents. DOM manipulation is the process of changing or manipulating the elements of a web page using JavaScript. In this game, DOM manipulation was used to dynamically render the game board and update it after each move.

Other Tools

This game was assembled and tested on Virtual Studio Code Editor.

Google Chrome and its developer tools was used to test and render the game during production.

Getting Started:

Demo:

Click to play game!

Instructions:

  • The game is for two players, player 1 and player 2. Players take turns dropping colored discs into the grid.
  • The objective is to be the first player to get four of their own colored discs in a row, either vertically, horizontally, or diagonally.
  • If all the cells of the grid are filled and no player has won, the game ends in a draw.
  • Have fun!

Planned future enhancements:

  • Add animations for when making a move
  • Add winner display as an element instead of an alert
  • Track win history
  • Display current player's turn
  • Add sound effects
  • Add in move history table
  • Add computer player logic for single player option

About

The classic game of connect four in TypeScript coded by Chat GPT.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors