GithubHelp home page GithubHelp logo

project-labyrinth's Introduction

Project Labyrinth ๐Ÿ—ฟ

The goal of the project was to build a text-based Labyrinth Game adventure using React Redux and thunks. The game retrieves a description and a list of actions from the backend and presents them to the player. Based on the player's choice, the state of the game is updated and a new description and set of actions are presented.๐ŸŽฒ๐ŸŽฎ

What have I learned ๐Ÿ’ก

  • To understand the structure of the data we received from Backend we used Postman to test out the game.
  • The game starts by letting the player create a Username, which is stored in the Redux global store reducer setUserName. With this information we made our first API POST request to the backend that provides us with the first set of instructions to the player.
  • When the player clicks on a direction, a new POST request is triggered to the Backend that in turn provides us with a new description and set of actions that we display to the player.
  • Each request is performed by a thunk: 1. performs a fetch, 2. receives the data, 3.passes that data to one of our reducers, 4. The reducer then saves this data to the global store and becomes our current game status.
  • When styling the game we wanted a unique background for each move. For this we created a function that switched different pictures based on the coordinates we received from each move.
  • We mainly used Styled Components and find this approach to be organized and easy to follow.
  • This project was a great opportunity to dive deeper into React Redux concepts and put them to use.

View it live

https://maze-amanda-madelene.netlify.app/ ( this is a pair-programming project by Amanda Tilly & Madelene Trang)

project-labyrinth's People

Contributors

emolsz avatar dependabot[bot] avatar puj avatar jenniedalgren avatar mt-dotse avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.