casino-server icon indicating copy to clipboard operation
casino-server copied to clipboard

GUI ?

Open shtefcs opened this issue 9 years ago • 14 comments

Hi there Ray,

Is this code have GUI as well or it's just server like u said. I am interested in paying some freelancer to build me poker game, so thats why I am asking.

shtefcs avatar Apr 19 '15 19:04 shtefcs

The purpose of code is just server itself.

It comes with a very simple web app as client, but it's quite plain and for demonstrating the features of server only.

floatinghotpot avatar Apr 19 '15 23:04 floatinghotpot

So we have game logic there , which need to be putted in GUI ?

shtefcs avatar Apr 20 '15 11:04 shtefcs

client.js is the api interface to interact with the poker server, https://github.com/floatinghotpot/casino-server/blob/master/lib/client.js

Here is the example to implement a GUI: https://github.com/floatinghotpot/casino-server/blob/master/wwwsrc/main.js

floatinghotpot avatar Apr 20 '15 11:04 floatinghotpot

Ok thank you very much Ray. I will find some guy to try to integrate it for me and let you know if we have any questions.

tnx again

shtefcs avatar Apr 20 '15 11:04 shtefcs

Btw Ray, let me ask again, are u interested working on this ? Me and my gf are working on front end & design, your part would most be backend. If yes we can create odesk contract if your prices are affordable for me. Add me on skype:ksifoking for faster chat.

shtefcs avatar Apr 21 '15 01:04 shtefcs

Hello bro, Can I add you on skype? I will help you integrate the poker game :)

remadrivan avatar Apr 21 '15 03:04 remadrivan

@adrivanrex Yes ofc, add me :)

shtefcs avatar Apr 21 '15 04:04 shtefcs

Hi Ray,

I just started with designing the UI for the app and I don't quite understand how to do that, so I hope you can help me a bit.

What I am trying to do is to separate this game room list, so each information inside <li> has it's own class. For example like this. How can I give each of them different class and in what file to check them?

Or maybe the logout button at the bottom left, how can i put it inside html file instead being defined in main.js file?

I am just trying to see some example how can i create design trough .html files and connect them with that functions that are defined trough javascript files.

jelenajjo avatar Apr 22 '15 22:04 jelenajjo

hi jelena, you can design the html part and put a button to anywhere as you wish, when the button is clicked, you need to handle the onclick event and call the API in client.js.

floatinghotpot avatar Apr 23 '15 06:04 floatinghotpot

And how can I see what is the api for that logout button for example? In what file, and how is defined? This is totally new thing for me, so I have to ask detailed like that in order to understand. :)

jelenajjo avatar Apr 23 '15 08:04 jelenajjo

client.js is the api interface to interact with the poker server, https://github.com/floatinghotpot/casino-server/blob/master/lib/client.js

Here is the example to implement a GUI: https://github.com/floatinghotpot/casino-server/blob/master/wwwsrc/main.js

floatinghotpot avatar Apr 23 '15 08:04 floatinghotpot

yes, I was looking at those codes but still don't understand from that how to implement a gui in .html file, not trough javascript. I see that this is far more complicated then I thought it will be.

jelenajjo avatar Apr 23 '15 08:04 jelenajjo

what i wrote in main.js is to dynamically present the dialogs and buttons whenever server push prompts.

in your app, you can just simply display normal button, when it's clicked, then call the client API:

client.rpc("login", {
   uid: "u0001",
   passwd: "secret"
}, function(err,ret){
   // handle the returned error code and data
});

floatinghotpot avatar Apr 23 '15 09:04 floatinghotpot

@floatinghotpot
If i change the wwwsrc to www and then run http://localhost:7000 im getting javascript error

Uncaught ReferenceError: require is not defined(anonymous function) @ main.js:2

meiry avatar Dec 16 '15 14:12 meiry