This repository was archived by the owner on Oct 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Create major project post for me, Ricky Guerin #65
Open
rickyguerin
wants to merge
1
commit into
ComputerScienceHouse:master
Choose a base branch
from
rickyguerin:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| layout: post | ||
| title: Chess 2 (Rust) | ||
| date: 2018-04-12 | ||
| categories: | ||
| - projects | ||
| description: An implementation of the Chess variant Chess 2 written in Rust | ||
| image: https://raw.githubusercontent.com/richardguerin/Chess-2/master/Chess2.PNG | ||
| author: Ricky Guerin | ||
| author-image: https://avatars0.githubusercontent.com/u/14082463?s=460&v=4 | ||
| author-bio: Third year member of Computer Science House, Computer Science major | ||
| author-email: richardguerin10@gmail.com | ||
| author-social: | ||
| github: https://github.com/richardguerin | ||
| linkedin: https://www.linkedin.com/in/richard-guerin/ | ||
| --- | ||
|
|
||
| *What is this project?* | ||
|
|
||
| A few months ago, I stumbled upon a chess variant called Chess 2. It allows players to choose from 6 interesting armies and adds a new win condition to breathe a lot of life into a centuries old board game. As a life-long lover of Chess, I was thrilled. Sadly the only way to play it on a computer was in a poorly-made Steam game. Wanting to bring this wonderful game to more people, I decided to FOSS it up and make my own implementation. Around the same time, I got interested in learning about Rust. To kill two birds with one stone, I used the development of this game as a vehicle to help me learn about Rust. | ||
|
|
||
| So, the idea for this project was to: | ||
|
|
||
| * Learn about Rust | ||
| * Implement Chess 2 as a command line app | ||
| * Make Chess 2 available on crates.io | ||
| * Stretch goal: Make a networked version of Chess 2 | ||
| * WAY distant goal: Make some kind of web client for Chess 2 | ||
|
|
||
| *Current state of the project?* | ||
|
|
||
| After working on it on and off for some weeks, the rules of the game are almost all implemented. When the program is run, two players can choose which army they will play as, the board will be displayed, and the players can take turns inputting moves to move their pieces around the board and capture enemy pieces. The system of checking and checkmating is not done, but I expect to have that done soon. After the game is complete, I'll take a break and then get to distributing the game and making the networked version. | ||
|
|
||
| *What did I learn?* | ||
|
|
||
| The main "what did I learn" here is that I now feel comfortable working in Rust. It took a while for me to get over not having inheritance, but I love how Rust is composed of ideas from all kinds of different languages. Moving forward, I can and absolutely will use Rust as my go-to language when making projects like this. | ||
|
|
||
| *Challenges / What would I do differently?* | ||
|
|
||
| It's hard to say what I would do differently because I am still working on this project and since I began working and experimenting at the same time I began learning Rust, I was held back by misunderstandings that I had about Rust. The biggest instance of this is when trying to define the behavior for each piece, I kept trying to make each piece a different struct while also having one data structure that can hold any combination of these structs and that sort of pseudo inheritance just wasn't working out, so I had to do a big ol' refactor, and I have since gotten over that hurdle. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you replace these
*Header*s with# Headerto be more markdown-y?