All Projects → codebuddies → Text_adventure

codebuddies / Text_adventure

Practice Design Patterns through implementing a text based adventure game

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Text adventure

Fooddelivery
Design OO food delivery app with C# & Design Patterns
Stars: ✭ 126 (+1160%)
Mutual labels:  patterns, design
100 Words Design Patterns Java
GoF Design Patterns, each pattern described with story from real life.
Stars: ✭ 117 (+1070%)
Mutual labels:  patterns, design
geo-pattern
Create beautiful generative geometric background images from a string ✨ TypeScript port of jasonlong/geo_pattern. Supports both Node.js and Browser.
Stars: ✭ 33 (+230%)
Mutual labels:  design, patterns
Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (+1100%)
Mutual labels:  patterns, design
Design Patterns In Dart
Gang of Four (GOF) design patterns implemented in Dart. Contributions welcome!
Stars: ✭ 135 (+1250%)
Mutual labels:  patterns, design
Semana Js Expert30
Aulas da Semana JS Expert 3.0 - Construindo um chat multiplataforma usando linha de comando e JavaScript Avançado
Stars: ✭ 238 (+2280%)
Mutual labels:  patterns, design
Designpatternslibrary
A comprehensive design patterns library implemented in C#, which covers various design patterns from the most commonly used ones to the lesser-known ones. Get familiar with and learn design patterns through moderately realistic examples.
Stars: ✭ 485 (+4750%)
Mutual labels:  patterns, design
Bumbag Ui
Build accessible & themeable React applications with your Bumbag 👝
Stars: ✭ 805 (+7950%)
Mutual labels:  design
Migreyes
The personal site of Mig Reyes, Design Director at Sprout Social.
Stars: ✭ 23 (+130%)
Mutual labels:  design
Nswindowstyles
A showcase of the many different styles of windows possible with NSWindow on macOS
Stars: ✭ 801 (+7910%)
Mutual labels:  design
Depth
Add some Depth to your fragments
Stars: ✭ 789 (+7790%)
Mutual labels:  design
Libfive
Infrastructure for solid modeling
Stars: ✭ 834 (+8240%)
Mutual labels:  design
Pytest Patterns
A couple of examples showing how pytest and its plugins can be combined to solve real-world needs.
Stars: ✭ 24 (+140%)
Mutual labels:  design
Vue Bootstrap With Material Design
Vue Bootstrap with Material Design - Powerful and free UI KIT
Stars: ✭ 803 (+7930%)
Mutual labels:  design
Rsdayflow
iOS 7+ Calendar (Date Picker) with Infinite Scrolling.
Stars: ✭ 843 (+8330%)
Mutual labels:  design
Go Patterns
Design patterns in Golang
Stars: ✭ 788 (+7780%)
Mutual labels:  patterns
Sketch Web Viewer
View and inspect Sketch 43 files in browser
Stars: ✭ 853 (+8430%)
Mutual labels:  design
Concise.css
A CSS framework that's lightweight and easy-to-use. Give up the bloat. Stop tripping over your classes. Be Concise.
Stars: ✭ 941 (+9310%)
Mutual labels:  design
Web Dev Resources Wiki
A collection of my favorite resources for web development, design, and frameworks
Stars: ✭ 22 (+120%)
Mutual labels:  design
Aiflatswitch
Nicely animated flat design switch alternative to UISwitch
Stars: ✭ 904 (+8940%)
Mutual labels:  design

Practice Design Patterns through implementing a text based adventure game

This collaborative project aims at getting a feel for design patterns and what problems they try to solve.

If you're interested in joining us on this adventure, you can find us at https://codebuddies.org/ (we're in the #python and #text-adventure channels in Slack).

Instructions

First assignment

  1. Fork the code. (Or, if you've requested collaboration access in the #text-adventures channel on the CodeBuddies Slack, you can git clone the repo directly.)
  2. Checkout the 0.1 tag by typing git checkout tags/0.1.
  3. Create a new branch based on this tag by typing git checkout -b [YOUR_NAME]_character. Make your changes while in this new branch.
  4. Commit your changes. Once you're happy with your code, create a pull request -- or, if you've been added as a collaborator, simply git push up this branch. (The first time you push, you'll have to type git push --set-upstream [branchname]).

Your task is to implement the MyCharacter class found in text_adventure/entity.py. The update method contains print statements explaining how the character should behave, and Workflow.png will give you some hints on what order things should be happening in.

WARNING: This code is going to throw an exception initially - there are some things missing.
Your mission is to find and fix those items!

You can find an example of what the output might be like in expected_output.txt.

Our FIrst Design Pattern: Finite State Machine

After you've implemented your solution, check out the state_machine branch and try to see if you can rework your code following that pattern.

Hangout reportback notes

24/7 hangout link: https://codebuddies.org/hangout/9rasmyL5rp9igiDyZ

June 3rd, 2017

@dangillet:

We reviewed together the naive way of implementing the problem and then we went through the Finite State Machine pattern. It allows us to remove a level of if statements, and keep all the logic about one state in a single place.

I've pushed 2 branches. One is https://github.com/codebuddiesdotorg/text_adventure/tree/state_machine and shows the basic implementation of the State machine for Python. It could be made more formal by using an Interface Class from which all the states derive. But as Python is a dynamic language, it's not really worth the effort.

I've pushed in another branch https://github.com/codebuddiesdotorg/text_adventure/tree/alt_implementation an alternate implementation using the fact that Python being dynamic, you can change the class of the Entity dynamically to have the desired implementation depending on the current state. I would not necessarily recommend doing it this way. I've discovered it while reading the Python Cookbook, 3rd edition. http://chimera.labs.oreilly.com/books/1230000000393

What I'm going now to do is merge the state_machine branch into master. From there we decided for practice to implement one or two more states. As we will do it all differently, we will rename our class whatever we want. Currently it was MyCharacter. I would suggest you take a name describing the kind of character you're going to implement. It could be a Dog, a Vampire or whatever floats your boat. As a fun experiment we will then merge all these classes and their states together and instantiate one of each character type to see them living in the world.

After that I think we will move on to really work on the foundation of the text based adventure game.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].