GithubHelp home page GithubHelp logo

move-website's Introduction

Move-Website

Table of Contents
  1. Prerequisites
  2. Playing the game
  3. Managing cards
  4. Managing cities
  5. Modifying or reading information in the past week
  6. Adding a new participant
  7. Adding a new team

Prerequisites

Please install the following packages before using this website.

  • pandas
  • random
  • numpy
  • os
  • flask
  • flask_util_js
  • matplotlib
  • requests
  • datetime
  • json

Replace player/user info.csv file with the version including Fitbit tokens.

Playing the game

  1. Launch the python program app_cookie.py.
  2. In the program console, there should be a website link provided as following. In your browser, go to this website link.
    Running on http://YOUR_IP_ADDRESS:5000/ (Press CTRL+C to quit)
  3. Log in with the username as 12, password as 123

Managing cards

Managing cards drawn

The cards are drawn randomly from the folder team/card_image. The cards are drawn by a fixed order. Adding new cards, removing cards, or renaming cards will change this order.

To add a new card, please make sure that it is in the .png format, and placed under the same folder team/card_image. The template static/cards_image_template.pptx can be used. Every card can be one slide, and exported by saving the powerpoint as image page by page.

Managing the action cards in the drop-down selection box

Add/remove/modify a row in the static/cards.csv file.

Managing cities

Change the bonus points/cards, which can be picked up at a city, in the map/city_dic.csv file - bonus field. If there is no bonus, please input nothing.

Change the distance between cities in the map/city_dis.csv file

  • dis1 refers to the shorter distance
  • dis2 refers to the longer distance
  • to add a direct route in the map, please add a new row. Please make sure that city_id1<city_id2, and both city ids are recorded in the map/city_dic.csv file.

Modifying and reading information in past weeks

When making changes to previous information, please only modify individual cells in the .csv file. Please not to add new lines or spaces or cells in those information files. Otherwise, it could break this website.

  1. Player miles: player/miles/PLAYER_ID.csv
  2. Player commitment cards: static/commitment_cards/(PLAYER_ID)_week(WEEK_NUMBER).csv
  3. Team progress(location, points,miles,cards): team/TEAM_ID.csv
  4. Team basic information(team member,name, game start date): team/team info.csv

Adding a new participant

Add a new row for the participant in the file player/user info.csv. The required fields are the following:

  • user_id
  • first_name
  • last_name
  • permanent_token, which is token to retrieve fitbit data, and generated by the same approach as the Motivate Walking study.

Adding a new team

  1. Add a new row for the team in the file team/team info.csv. All fields are required for the team.
  2. Make a copy of the file team/template.csv, rename it as team/TEAM_ID.csv, where TEAM_ID is the same as the team_id field in the team/team info.csv file.

move-website's People

Contributors

velvinnn avatar

Stargazers

Shirui Chen avatar  avatar

Watchers

 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.