Git Product home page Git Product logo

megaminerai-saloon's Introduction

Saloon JavaScript Client (via Node.js)

This is the root of you AI. Stay out of the joueur/ folder, it does most of the heavy lifting to play on our game servers. Your AI, and the game objects it manipulates are all in games/saloon/, with your very own AI living in games/saloon/ai.js for you to make smarter.

How to Run

This client has been tested and confirmed to work on the Campus rc##xcs213 Linux machines, but it can work on your own Windows/Linux/Mac machines if you desire.

Requirements

You need Node.js, which should install node and npm for you. Version 4.6.0 is officially supported, though older versions back to 0.10, and newer versions such as v6.X should work just as well.

In addition, node-gyp is required to build the netlinkwrapper module, which is a wrapper to a simple C++ socket library. Make sure npm can build node-gyp projects by following their installation instructions.

Linux

If you are using your own Linux/Mac make sure you have g++ installed and node-gyp can find it, then:

make
./testRun MyOwnGameSession

Windows

Install Node.js and a C++ compiler. Having a version of Visual Studio with Visual C++ normally installs these tools for you on Windows, but MS Build Tools 2013 should work as well if you have a hatred of Visual Studio on Windows, or get node-gyp build errors complaining of no way to build native V8 addons. You may need the --msvs_version=2013 flag if npm install gives a compiler error.

Then from a powershell:

npm install
node main.js Saloon -s r99acm.device.mst.edu -r MyOwnGameSession

Other Notes

It is possible that on your Missouri S&T S-Drive this client will not run properly. This is not a fault with the client, but rather the school's S-Drive implimentation changing some file permissions during run time. We cannot control this. Instead, we recommend cloning your repo outside the S-Drive and use an SCP program like WinSCP to edit the files in Windows using whatever IDE you want if you want to code in Windows, but compile in Linux.

The only file you should ever modify to create your AI is the ai.js file. All the other files are needed for the game to work. In addition, you should never be creating your own instances of the Game's classes, nor should you ever try to modify their variables. Instead, treat the Game and its members as a read only structure that represents the game state on the game server. You interact with it by calling the game functions.

megaminerai-saloon's People

Contributors

jacobfischer avatar

Watchers

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