Coder Social home page Coder Social logo

erantapaa / tfoo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nbartlomiej/tfoo

0.0 2.0 0.0 94 KB

Five-in-a-Row online with Haskell and Server-sent Events

Home Page: http://tfoo.herokuapp.com

License: MIT License

Haskell 53.02% Shell 0.08% JavaScript 12.64% CSS 34.26%

tfoo's Introduction

Tfoo

About

An implementation of Five in a Row game done in Haskell and Yesod with Server-sent Events.

Demo: tfoo.herokuapp.com <img src=“http://i.imgur.com/fW4Wu.png” />

It is based on a previous project of mine, takefive, which is a minimal Five in a Row implementation. If you’re new to Haskell and would like to see sample code, inspect takefive’s source code.

Tfoo is an attempt to create simple, modern and useful Haskell web application. It doesn’t require any database setup (because it doesn’t use database) and its deployment is relatively easy (see: Deploying Tfoo and other Haskell applications to Heroku ). Some people say that it is also an enjoyable game.

Project structure

Tfoo/*.hs          : Most basic, non-IO data and functions.
Tfoo/Handlers/*.hs : Only topmost Handler functions.
Tfoo/Helpers/*.hs  : IO functions built on top of Tfoo/*.hs code; these
                     helper functions are used in Handlers.
Main.hs            : Main entry point.

Dependencies

The project lacks Cabal file. I’ll add one in my free time (pull requests welcome too!). Below, for quick reference, a list of all dependencies.

wai-eventsource (1.1.0.1)
yesod (0.10.2)
yesod-static (0.10.1)
yesod-default (0.6.1)
blaze-builder (0.3.1.0)
shakespeare-js (0.11.2)
shakespeare-css (0.10.8)
hamlet (0.10.9.1)

ToDo

(pull requests welcome)

  • Add cabal file.

  • Improve AI (make it faster; implement minimax).

  • Create a mobile view.

  • Create a (public) dashboard that would show current games (real-time).

  • There is a bug that causes Server-sent Events not being propagated after ~3 minutes of client (Safari browser) waiting. Investigate and fix.

License

MIT, see LICENSE file for details.

tfoo's People

Contributors

nbartlomiej avatar erantapaa avatar

Watchers

 avatar James Cloos 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.