Wednesday, June 6, 2018

New Python Projects: Grade Calculator & Bank Showdown

I have been slightly inactive on here over the last 10 weeks because of the rigorous CS180 (Algorithms & Complexity) and LING165B (Syntax II) courses. I have to write a 10+ page single spaced paper on long distance binding on a slightly obsolete Japanese reflexive and come up with lots of reductions for a variety of NP problems. 

Anyways, I have some new scripts to show you all - check them out!

---Grade Calculator----

Language: Python 2/3

I've spent some time developing a nice grade calculator script (in Python 2 and 3) to help calculate some of reach grades I will be attempting to get this quarter.

It takes any number of categories (like Quizzes, Tests, Homework, etc..), and any number of assignments for each categories (Quiz 1, Quiz 2, etc...), and supports weighting (Quiz 20%, Test 30%, Homework 10%, etc.). It was fun playing with lists and not using set functions for certain categories, and instead making a general function that can take any category as a parameter. Check out an image of the output below, and the link to it below the image.


---Bank Showdown---

Language: Python 3 (Still in progress)

I was playing Shin Megami Tensei: Strange Journey Redux and found a mini game in it called 10 Rocks, which I found to be really interesting, tricky, and fun. I decided to implement this on my own using Python 3 and with 2 player multiplayer and changed a few things to make it go from rocks to money (and hence, Bank).

The game runs like the following: You and your opponent start with 5 dollars, and have the goal of reaching 10 dollars. You need to choose one of three moves each turn, and the round ends when both players choose a move. 
  • Move choice 1 is adding a dollar to your balance from the bank. 
  • Move choice 2 is stealing two dollars from the opponent's bank account. 
  • Move choice 3 blocks any stealing attempts from an opponent
    • If the opponent chooses a 2 and you block it, YOU obtain 2 dollars from them!
These rules make it a strategic game that has a strong base allowing for further developments in the future. I used classes and member functions with Python to help make this work, acting as a base for a few things that are still currently on my mind. 


Currently, one can compile the script and play it with a friend, but some features that are currently either unfinished or planned to be added include the following: 
  • Single player mode with multiple AI difficulties
  • Characters to choose from, each one having a unique skill (with cooldowns, hopefully)
  • Ability to change the starting balance and end-game balance amounts.

--- Summer Plans ---

I am going through Week 10 and a bunch of crazy Syntax (II) essays that are making me think about languages from a completely different perspective. After this quarter ends, I will be heading to Japan for two months as an undergraduate research assistant researching parallel and distributed systems and network algorithms at the Graduate School of Information Technology at Osaka University.

After that, I will be heading back to Los Angeles early September to spend some time taking online courses, designing my own games using Unity and GameMaker Studio 1.4, and managing future curricula and the website for SuperCoding Inc (Site). By the way, I am now going to be a partner for the company, which is really exciting; I cannot wait to see what I can do to make SuperCoding even more successful!!

Until my next post, happy coding~