Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group 5 Final Project Submission #16

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
14e4a70
Create proposal.md
Sep 28, 2021
f964257
Spelling and added Node/Express
Sep 28, 2021
3077d56
Setup files + basic websocket functions
Oct 6, 2021
430a738
Changed websockets -> ws
Oct 8, 2021
505412d
Started on board helper functions
Oct 8, 2021
1bb6278
finished IsValidPawnMove
rjstebe Oct 8, 2021
9eb7fb4
basic wall placement check
rjstebe Oct 8, 2021
3ed2957
Room object and joining rooms
rjstebe Oct 8, 2021
1499996
Pathfinding
Oct 9, 2021
0cb2903
Update log
Oct 9, 2021
cc7c3a6
Update README.md
Oct 9, 2021
cac6cff
Text client?
Oct 10, 2021
a76f324
finished server logic
rjstebe Oct 10, 2021
f6680c0
Merge branch 'server-progress' of https://github.com/m-d-jo/final_pro…
rjstebe Oct 10, 2021
7b3a695
fixed room full send call
rjstebe Oct 10, 2021
2a93e64
Merge pull request #1 from m-d-jo/server-progress
rjstebe Oct 10, 2021
c6db04a
Pawns able to move
markjforte2000 Oct 10, 2021
5d4d77b
Fix input bug
Oct 10, 2021
1da3f76
Merge branch 'main' of https://github.com/m-d-jo/final_project
Oct 10, 2021
da6f5bd
delete room when last player disconnects
rjstebe Oct 10, 2021
0960279
Merge pull request #2 from m-d-jo/server-progress
rjstebe Oct 10, 2021
90b95a0
prevent player from passing turn by not moving
rjstebe Oct 10, 2021
bc51d48
fixed player 1 reconnecting to a room crashing server
rjstebe Oct 10, 2021
277374d
Fix bug preventing corner jumps
Oct 10, 2021
a091655
Merge branch 'main' of https://github.com/m-d-jo/final_project
Oct 10, 2021
0d3e586
Placing walls functionality
palomagonzalez Oct 10, 2021
2016dd8
added express file server to server.js
rjstebe Oct 10, 2021
6e4d623
Merge branch 'main' of https://github.com/m-d-jo/final_project
rjstebe Oct 10, 2021
b69cffb
removed board.js script tag in header
rjstebe Oct 10, 2021
e0eae68
Styling changes
palomagonzalez Oct 10, 2021
81738f5
Merge branch 'main' of https://github.com/m-d-jo/final_project into main
palomagonzalez Oct 10, 2021
503f1b0
Add pathfinding check to wall placement
Oct 10, 2021
bd671c6
Merge branch 'main' of https://github.com/m-d-jo/final_project
Oct 10, 2021
fd041a3
server now doesn't validate moves after game has ended
rjstebe Oct 10, 2021
3d40295
Merge branch 'main' of https://github.com/m-d-jo/final_project
rjstebe Oct 10, 2021
89d100f
UI addons
markjforte2000 Oct 10, 2021
8bc7c54
Merge remote-tracking branch 'origin/main'
markjforte2000 Oct 10, 2021
6d1b002
fix gameOver is not a function error
rjstebe Oct 10, 2021
70ebc48
Merge branch 'main' of https://github.com/m-d-jo/final_project
rjstebe Oct 10, 2021
88029f0
Fix pathfinding bug pt. 2
Oct 10, 2021
d817046
Merge branch 'main' of https://github.com/m-d-jo/final_project
Oct 10, 2021
5f97637
Reset invalid test walls before returning
Oct 10, 2021
4c5bc31
extended check for no room code
rjstebe Oct 10, 2021
1289c20
Merge branch 'main' of https://github.com/m-d-jo/final_project
rjstebe Oct 10, 2021
40e0cfa
send room code to server under correct key name
rjstebe Oct 10, 2021
ea9fbdf
fix syntax for adding room key to message data
rjstebe Oct 10, 2021
fbf57f3
UI updates room code
markjforte2000 Oct 10, 2021
01ec233
Print JSON string instead of object
Oct 10, 2021
d48d8c3
Merge branch 'main' of https://github.com/m-d-jo/final_project
Oct 10, 2021
c57a417
Clicking friend links opens new tab
markjforte2000 Oct 10, 2021
1365d67
Merge remote-tracking branch 'origin/main'
markjforte2000 Oct 10, 2021
b1598c7
swap port numbers
rjstebe Oct 11, 2021
97f4238
Merge branch 'main' of https://github.com/m-d-jo/final_project
rjstebe Oct 11, 2021
16036b2
working for glitch
markjforte2000 Oct 11, 2021
dfcbf44
Merge remote-tracking branch 'origin/main'
markjforte2000 Oct 11, 2021
7bd3f3a
Update README.md
Oct 11, 2021
9b67d5f
Remove client logs, general cleanup
Oct 11, 2021
4149609
Added video link
m-d-jo Oct 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/*
.env
package-lock.json
67 changes: 24 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,32 @@
# Final Project
*Due before the start of class, October 11th (final day of the term)*
## CS4241 Final Project
Group 5: Paloma González Gálvez, Mark Forte, Ryan Stebe, Matt Johannesen

For your final project, you'll implement a web application that exhibits understanding of the course materials.
This project should provide an opportunity to both be creative and to pursue individual research and learning goals.
### Summary
We created a 2-player web version of the game [Quoridor](https://en.wikipedia.org/wiki/Quoridor), in which players each move their pawn across a 9x9 board (from opposing sides) while placing walls to hinder their opponent's progress.

## General description
Your project should consist of a complete Web application, exhibiting facets of the three main sections of the course material:
Given that this project involves multiple clients in a competitive setting, a large focus of our project was cheat protection. We have both the server and client validate the player's moves - that way even if the client code is modified, the server will refuse invalid inputs and will not change the game state.

- Static Web page content and design. You should have a project that is accessible, easily navigable, and features significant content.
- Dynamic behavior implemented with JavaScript (TypeScript is also allowed if your group wants to explore it).
- Server-side programming *using Node.js*. Typically this will take the form of some sort of persistent data (database), authentication, and possibly server-side computation.
- A video (less than five minutes) where each group member explains some aspect of the project. An easy way to produce this video is for you all the groups members to join a Zoom call that is recorded; each member can share their screen when they discuss the project or one member can "drive" the interface while other members narrate (this second option will probably work better.) The video should be posted on YouTube or some other accessible video hosting service. Make sure your video is less than five minutes, but long enough to successfully explain your project and show it in action. There is no minimum video length.
A large portion of our server code is dedicated to validating pawn and wall placements. Because walls in Quoridor sit in between grid spaces, we had to come up with our own methods for checking blockages, calculating legal movements, and pathfinding (to satisfy Quoridor's rule that there must always be a path between each pawn and the side of the board they're trying to reach).

## Project ideation
Excellent projects typically serve someone/some group; for this assignment you need to define your users and stakeholders. I encourage you to identify projects that will have impact, either artistically, politically, or in terms of productivity.
Overview video of our project: https://www.youtube.com/watch?v=gbEOEv0PTZ4

## Logistics
### Team size
Students are will work in teams of 3-5 students for the project; teams of two can be approved with the permission of the instructor. Working in teams should help enable you to build a good project in a limited amount of time. Use the `#project-logistics` channel in Discord to pitch ideas for final projects and/or find fellow team members as needed.
### Instructions
Two players (or just two browser tabs) are needed to run the game.
Go to http://final-project-group-5.glitch.me/ to load the first client.
The first client will provide a "join" link - open it on another device/window to start the second client and begin playing.
(If either of these steps doesn't work, close all Quoridor windows and try again.)

Teams must be in place by end of day on Saturday, September 25th. If you have not identified a team at this point, you will be assigned a team. You will be given some class time on Monday to work on your proposal, but please plan on reserving additional time as needed.
You only need your mouse to play. On your turn, select what you want to do (move your pawn, place a horizontal wall, or place a vertical wall) above the board, then click on the board to make your move. If you try to make an invalid move, a warning will be displayed under the board.

### Deliverables
### Libraries
- Node.js
- Server code; manages game sessions and validates input from the client to prevent cheating
- p5.js
- Board visuals
- Websockets (ws)
- Simple communication between server and clients
- Express
- Serving the game client page

__Proposal:__
Provide an outline of your project direction and the names of associated team members.
The outline should have enough detail so that staff can determine if it meets the minimum expectations, or if it goes too far to be reasonable by the deadline. Please include a general description of a project, and list of key technologies/libraries you plan on using (e.g. React, Three.js, Svelte, TypeScript etc.). Name the file proposal.md and submit a pull request.
Submit a PR to turn it in by Monday, September 27th at11:59 PM. Only one pull request is required per team.

There are no other scheduled checkpoints for your project.

#### Turning in Your Outline / Project
Submit a second PR on the final project repo to turn in your app and code. Again, only one pull request per team.

Deploy your app, in the form of a webpage, to Glitch/Heroku/Digital Ocean or some other service; it is critical that the application functions correctly wherever you post it.

The README for your second pull request doesn’t need to be a formal report, but it should contain:

1. A brief description of what you created, and a link to the project itself (two paragraphs of text)
2. Any additional instructions that might be needed to fully use your project (login information etc.)
3. An outline of the technologies you used and how you used them.
4. What challenges you faced in completing the project.
5. What each group member was responsible for designing / developing.
6. A link to your project video.

Think of 1,3, and 4 in particular in a similar vein to the design / tech achievements for A1—A4… make a case for why what you did was challenging and why your implementation deserves a grade of 100%.

## FAQs

- **Can I use XYZ framework?** You can use any web-based frameworks or tools available, but for your server programming you need to use Node.js. Your client-side scripting language should be either JavaScript or TypeScript.
### Work Distribution
We all met to discuss the game and agree on a set of message formats that the server and clients would use to communicate - once that was settled, Paloma and Mark focused on the client, while Ryan and Matt focused on the server.
25 changes: 25 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "quoridor",
"version": "1.0.0",
"description": "A 2-player networked version of the board game Quoridor.",
"main": "server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/m-d-jo/final_project.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/m-d-jo/final_project/issues"
},
"homepage": "https://github.com/m-d-jo/final_project#readme",
"dependencies": {
"express": "^4.17.1",
"nodemon": "^2.0.13",
"ws": "^8.2.3"
}
}
18 changes: 18 additions & 0 deletions proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## CS4241 Final Project - Proposal
Group 5: Paloma González Gálvez, Mark Forte, Ryan Stebe, Matt Johannesen

### Concept
A two-player implementation of the board game [Quoridor](https://en.wikipedia.org/wiki/Quoridor), played using two clients connected to a game server.

Quoridor is a relatively straightforward game, in which players move their pawn across a 9x9 board while hindering their opponent's progress by placing walls. Aside from the game logic and interface, the major technical challenge of this project will be having the server accept and validate requests from more than one client, in a way that minimizes the chance of one client breaking the game.

### Libraries
- Node.js
- Express
- p5.js - Board visuals
- [Pathfinding](https://www.npmjs.com/package/pathfinding) (npm package) - Used by server to verify whether a player has a valid winning path (required by one of the game rules)
- Middleware to track which client is sending info
- Thinking of doing this with cookies
- Middleware for tracking timeouts
- Socket.IO?
- Unsure of this one - seems to be commonly used by browser games for client-server communication
20 changes: 20 additions & 0 deletions public/css/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@import url('https://fonts.googleapis.com/css2?family=PT+Sans&display=swap');

div {
display: inline-block;
}

form {
margin-bottom : 20px;
margin-top: 0px;
font-size : 15px;
font-family: 'PT Sans', sans-serif;
color: #383838;
}

h3 {
margin-bottom: 0px;
font-size : 25px;
font-family: 'PT Sans', sans-serif;
color: #383838;
}
Loading