Giter Club home page Giter Club logo

connect4's Introduction

connect4

remake of the popular 2 player game connect 4 | cis 110 final project

Project

Name: Joey Zhao
PennKey: joeyzhao
Recitation: 202
Project choice: Connect 4

Have you entered all help, collaboration, and outside resources in your help log? If not, do so now.

I used images from google to visually represent the board of the game 
and the yellow and red chips that represent a player.

Besides the images, I did not receive any help outside of TA office hours,
did not collaborate with anyone, and I did not use any resources beyond
the standard course materials.

How do you execute your program? Which class do you run, are there any command line arguments?

 To execute the game, run the Connect4.java file. There are no command line
 arguments. The game can be executed through the main function by creating an
 instance of the connect 4 object.

Did you add any additional features to your project beyond the specification that you added? If so, describe them here.

Rather than clicking anywhere on a specific column to add a move,
I created seven buttons to represent the 7 columns. To add a move, 
the player just needs to click on the button that represents that 
specific column. In addition, not sure if this counts as a feature, 
more of a decoration I suppose, I added the name of the game on the
starting menu and the game page.

List all the files in project.zip and explain their purpose.

 Board.java - creates an object to represent the board
 BoardTest.java - used to test the functions in Board.java
 Chip.java - creates an object to represent the chips
 Connect4.java - uses the board and chip objects to implement the 
                 game of connect 4
 
 Connect4Board.png - image of the board used in Connect4.java
 redchip.png - image of the red chip used in Connect4.java to represent
               player 1
 yellowchip.png - image of the yellow chip used in Connect4.java to 
                  represent player 2

Describe any serious problems you encountered.

 Getting the mouse click to work right was really difficult, but the
 video presented on piazza was helpful. 

List any other comments here. Feel free to provide any feedback on how much you learned from doing the assignment, and whether you enjoyed doing it.

 From this project, I really learned the purpose of helper functions.
 At first, I repeated the code to draw the "Player 1 Wins!" and 
 "Player 2 Wins", and "Draw!" messages under each button for each column
 and I was wondering why my code was so long. Then I realized that I could
 put all those lines of code into a help function and cut it down to one 
 line of code. I realized that I never really understood the usefulness 
 of helper functions in simplifying the code until now. 

connect4's People

Contributors

joeyszhao 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.