This repository contains the front-end code for the Dictator Game, a classic experiment in behavioral economics. In this interactive game, players can assume the roles of either dictators or citizens and make decisions about allocating resources among one another.
The Dictator Game is designed to study decision-making behavior that tests theories of fairness and altruism. This front-end implementation provides a user-friendly interface for interacting with the game logic, participating in game sessions, and viewing results.
The game will features multiple levels, tiles, and dynamic roles, providing a rich platform for exploring decision-making, strategy, and social dynamics in an economic context.
- Role Selection: Users can choose to play as a dictator or a citizen.
- Resource Allocation: Dictators can allocate resources between themselves and another player.
- Real-Time Updates: The game updates in real-time as players make their decisions.
- Session History: Players can view past game results and decisions.
- JavaScript: The project is built using modern JavaScript with Local Storage.
- Vue.js: The project uses Vue.js for reactive user interfaces.
- Vuex: State management is handled by Vuex.
- Vue Router: Routing is managed with Vue Router.
- Axios: HTTP requests are made using Axios.
- Bulma: The application uses the Bulma CSS framework for styling.
Follow these steps to get the project up and running on your local machine for development and testing purposes.
- Node.js
- npm or yarn
-
Clone the repository:
git clone https://github.com/mtwesley/dictator-game-web cd dictator-game-web
-
Install dependencies:
npm install
-
Set up the environment variables: Use the file named
.env
and adjust the settings to match your local development environment. -
Serve the application:
npm run serve
-
Open your browser and visit
http://localhost:8080
to view the application.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.