Oliver's Blog
  • 🤩Welcome!
  • Projects
    • RISC Game
    • Mini Amazon
    • HTTP Caching Proxy
    • Course Enrollment App
    • Fitness Tracker App
    • Voice Shopping Assistant
    • Graphics Town
  • Algo
    • Binary Search
      • Classical Binary Search
      • First Position of Target
      • Last Position of Target
      • Guess Number Higher or Lower
      • Search in a Big Sorted Array
      • Total Occurrence of Target
      • First Bad Version
      • Find Minimum in Rotated Sorted Array
      • Maximum Number in Mountain Sequence
      • Search a 2D Matrix
      • Search a 2D Matrix II
      • Search for a Range
      • Smallest Rectangle Enclosing Black Pixels
      • Find Peak Element
      • Search in Rotated Sorted Array
      • Wood Cut
      • Find the Duplicate Number
      • Sqrt(x) II
      • Maximum Average Subarray II
      • Copy Books
      • How Many Problem Can I Accept
    • Linked List
      • Insert Node in Sorted Linked List
      • Merge Two Sorted Lists
      • Merge K Sorted Lists
      • LRU Cache
      • Reverse Linked List II
      • Copy List with Random Pointer
      • Reverse Nodes in k-Group
      • Add Two Numbers
      • Swap Nodes in Pairs
      • Rotate List
      • Linked List Cycle
      • Linked List Cycle II
      • Intersection of Two Linked Lists
      • Remove Linked List Elements
      • Reverse Linked List
      • Delete Node in a Linked List
      • Odd Even Linked List
      • Partition List
    • Recursion Basics
      • Fibonacci
      • Double Factorial
      • Reverse Order Storage
      • Linked List Weighted Sum In Reverse Order
    • Binary Tree
      • 1. Traversal
        • Binary Tree Preorder Traversal
        • Binary Tree Inorder Traversal
        • Binary Tree Postorder Traversal
        • Construct Binary Tree from Inorder and Postorder Traversal
        • Minimum Depth of Binary Tree
        • Find Leaves of Binary Tree
        • Reconstruct Itinerary
      • 2. Classical Questions
        • Maximum Depth of Binary Tree
        • Average of Levels in Binary Tree
        • Binary Tree Leaf Sum
        • Invert Binary Tree
        • Binary Tree Path Sum
        • Binary Tree Path Sum II
        • Binary Tree Path Sum III
        • Clone Binary Tree
        • Sum Root to Leaf Numbers
        • Binary Tree Level Sum
        • Binary Tree Paths
      • 3. Binary Search Tree
        • Insert Node in a Binary Search Tree
        • Remove Node in Binary Search Tree
        • Validate Binary Search Tree
        • Trim a Binary Search Tree
        • Search Range in Binary Search Tree
        • Inorder Successor in BST
        • Binary Search Tree Iterator
        • Recover Binary Search Tree
      • 4. Divide and Conquer
        • Balanced Binary Tree
        • Minimum Subtree
        • Subtree with Maximum Average
        • Maximum Subtree
        • Lowest Common Ancestor of a Binary Tree
        • Lowest Common Ancestor II
        • Lowest Common Ancestor III
        • Binary Tree Maximum Path Sum II
        • Binary Tree Maximum Path Sum
        • Path Sum III
      • Convert Sorted Array to Binary Search Tree
      • Path Sum
      • Lowest Common Ancestor of a Binary Search Tree
      • Sum of Left Leaves
      • Minimum Absolute Difference in BST
      • Minimum Distance Between BST Nodes
      • Convert Sorted List to Binary Search Tree
      • Range Sum of BST
      • Kth Smallest Element in a BST
      • Find Largest Value in Each Tree Row
    • Sorting
      • Sort Integers
      • Merge Two Sorted Arrays
      • Reverse Pair
      • Sort List
      • Partition Array
      • Sort Colors
      • Kth Largest Element
      • Multi-keyword Sort
    • Two Pointers
      • Window Sum
      • Two Sum - Difference equals to target
      • Valid Palindrome
      • Remove Duplicates from Sorted Array
      • Recover Rotated Sorted Array
      • Two Sum II - Input array is sorted
      • Two Sum - Unique pairs
      • Two Sum - Closest to target
    • Queue & Stack
      • Implement Queue by Interface
      • Implement Stack
      • Implement Queue by Two Stacks
      • Implement Stack by Two Queues
      • Binary Tree Level Order Traversal
      • Valid Parentheses
      • Min Stack
      • Largest Rectangle in Histogram
      • Evaluate Reverse Polish Notation
      • Implement Queue by Linked List II
      • Basic Calculator II
      • Moving Average from Data Stream
      • Reveal Cards In Increasing Order
      • Longest Valid Parentheses
    • Hash Table
      • Rehashing
      • Valid Anagram
      • Two Sum
      • Contiguous Array
      • Anagrams
      • Remove Duplicate Numbers in Array
      • Friendship Service
    • Heap & Priority Queue
      • Heapify
      • Top k Largest Numbers II
      • K Closest Points
      • Kth Smallest Number in Sorted Matrix
      • Find Median from Data Stream
      • Sliding Window Median
      • Trapping Rain Water II
      • High Five
    • BFS
      • 1. BFS in Binary Tree
        • Check Full Binary Tree
        • Binary Tree Level Order Traversal II
        • Binary Tree Maximum Path Sum II
        • Convert Binary Tree to Linked Lists by Depth
      • 2. Connected Graph & Topologic Sorting
        • Search Graph Nodes
        • Graph Valid Tree
        • Connected Component in Undirected Graph
        • Topological Sorting
        • Course Schedule
        • Course Schedule II
        • Sequence Reconstruction
        • Clone Graph
        • Alien Dictionary
    • Array
      • Remove Element
      • Search Insert Position
      • Maximum Subarray
      • Plus One
      • Merge Sorted Array
      • Pascal's Triangle
      • Pascal's Triangle II
      • Best Time to Buy and Sell Stock
      • Best Time to Buy and Sell Stock II
      • Majority Element
      • Contains Duplicate
      • Contains Duplicate II
      • Summary Ranges
      • Missing Number
      • Move Zeroes
      • Third Maximum Number
      • Binary Search
      • Pairs of Songs With Total Durations Divisible by 60
      • 3Sum
      • Median of Two Sorted Arrays
      • Running Sum of 1d Array
      • Container With Most Water
    • String
      • Longest Substring Without Repeating Characters
      • Roman to Integer
      • Implement strStr()
      • Reverse Words in a String
      • First Unique Character in a String
      • Count Unique Characters of All Substrings of a Given String
    • Math
      • Pow(x, n)
      • Narcissistic Number
      • A + B Problem
    • Dynamic Programming
      • Fibonacci Number
      • N-th Tribonacci Number
      • Climbing Stairs
      • Min Cost Climbing Stairs
    • LeetCode vs. LintCode Table
  • React Notes
    • Optimizing Performance in React
  • Golang Notes
    • Basics
      • Setup
      • Hello World
      • Structure
      • Data Types
      • Variables
      • Operators
      • Constants
      • Decision Making
      • Loops
      • Special Statements
    • Official Tutorial Notes
      • More Types
        • Functions
        • Pointers
        • Structs
        • Arrays
        • Slices
        • Range
        • Maps
        • More Functions
      • Methods and Interfaces
        • Methods
        • Interfaces
        • Stringers
        • Errors
        • Images
        • Readers
      • Concurrency
        • Goroutines
        • Channels
        • Range and Close
        • Select
        • Mutual Exclusion
  • Miscellaneous
    • Traveling to China During a Global Pandemic
Powered by GitBook
On this page
  • Introduction
  • Game Deployment
  • Game Features
  • Sign in/Register
  • Game List
  • Game Play
  • Project Management
  • Project Repo
  • Task Breakdown
  • UML Diagram

Was this helpful?

  1. Projects

RISC Game

PreviousWelcome!NextMini Amazon

Last updated 1 year ago

Was this helpful?

Introduction

RISC game stands for Really Interesting Strategic Conquest game. This is a multiplayer web-based strategic game, accommodating up to 4 players, where they can conquer territories, strategize movement and upgrades for soldiers, and utilize random game cards.

Game Deployment

Game deployment is easy because Docker is employed to streamline the process. I reserved a publicly accessible VM at our school with an IP address of . The game repository can be accessed here:

On the VM,

git clone https://github.com/YushunChen/risc-game.git
sudo apt install docker-compose
cd risc-game
sudo docker-compose build
sudo docker-compose up

Game Features

Sign in/Register

The user has to register first if they have not done so. They can log back into the game and continue plays a previous game they have participated in.

Game List

Once the user is logged in, they are able to create games based on the number of players available. They can join a new game by finding available games that have already been created. They can start or continue to play a game by simply clicking the green "Play" button on the left card.

Game Play

The detailed game play is rather complicated since the game had 3 iterations in terms of requirements definitions. Here are the detailed requirements:

Now, I will highligh some of the major features of the game.

Game Goal

The goal of this game is to conquer territories on the map.

Move and Attack

Each territory has some number of soldiers defending it. Players can move their soldiers to their own territories for attacking or defending purposes.

The more soldier you have in a territory, the more likely you are able to win a battle if you attack another territory or another player attacked your territory. Also, each territory has different food and technology resources so its value vary. The players can gain food and technology resources that are generated from their territories.

Research

Each player has a technology level as seen on far right of the player info card. This allows them to upgrade their soldier to be more powerful, which means more likely to win battles.

Upgrade

Upgrade order basically upgrades some number of soldiers which is allowed by the technology level.

Card

The players can draw 3 random cards each turn that have either positive or negative effects on their gameplay. There is a probability distribution designed to avoid abusing the card drawing system because the cards that are effective (other than no luck card) are powerful in the game. Each player can draw 3 cards per turn, and the cards are played automatically.

  • CARD_CONQUERING_WARRIORS: (10% chance of drawing): This card would add one Level-6 unit to every territory owned by the player, even if the player does not have a sufficient tech level for level-6 units.

  • CARD_FAMINE: (10% chance of drawing): This card is a negative effect card which would stop the tech/food resource creation for the player for the next round.

  • CARD_UNBREAKABLE_DEFENCE: (10% chance of drawing): This card would give the player an opportunity to defend one of their territories no matter the opponent. Defending players would not lose any units from that territory; however, opponents would lose all their attacking units.

  • CARD_NO_LUCK: (70% chance of drawing): This card would not have any effect on the gameplay and the player would waste drawing a card.

Spy

Spy is a special type of soldier that you can deploy to enemy territories. By doing so, you are able to see territories that you are not supposed to. By the game rules, you are only able to see territories that are directly adjacent to your own territories. Other territories are invisible as seen on the map.

Cloak

Once the player reached technology level 3, he can cloak a territory, which means hiding the territory from the enemies. This cloaking hides from adjacent viewing, but not from spies.

Here are only the main features in a nutshell. Make sure to check out the actual game yourself! :)

Project Management

Project Repo

This is only a duplicate version of the GitLab repo that we actually used. Unfortunately, the GitLab repo is only internally visible.

Task Breakdown

UML Diagram

Then, the game is up and running and can be access at

http://vcm-33920.vm.duke.edu:3000/
http://vcm-33920.vm.duke.edu/
GitHub - YushunChen/risc-game: A multiplayer web-based strategic game, accommodating up to 4 players, where they can conquer territories, strategize movement and upgrades for soldiers, and utilize random game cards.GitHub
GitHub - YushunChen/risc-game: A multiplayer web-based strategic game, accommodating up to 4 players, where they can conquer territories, strategize movement and upgrades for soldiers, and utilize random game cards.GitHub
Project Repo
RISC UML Diagram EVO3Google Docs
Logo
Logo
Logo
174KB
prj1.pdf
pdf
Iteration 1
102KB
prj2.pdf
pdf
Iteration 2
62KB
prj3.pdf
pdf
Iteration 3
Register
Sign in
Game List
Game Play
Different Types of Soldiers in a Territory
Player Info
Research Order
Upgrade Order
Draw Cards
Example Card
Cloak Order