Giter Site home page Giter Site logo

karya55 / servergame Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 8 KB

The Server part of the project Two Boxes with Balls. Balls are bouncing inside rectangular container boxes. This program is running on two computers. If the ball touches the right side border of the first box, it will emerge from the left side border of the second box.Used different colors for balls which run on different computers. When a ball touches the right side border, It will capture current attributes of this ball object and send this information using sockets to the ball bouncing program which is running on the second computer. This program will create a ball object with the variables received from the first computer. The ball object on the first computer should be destroyed. The first computer is the client and the second computer is the server. You can also run the client and server program on the same computer. Two programs are slightly different, the first program includes the client code and the second program includes the server code.Since the ball class includes Graphics class, we can not serialize the ball object and send it to the second computer. It should be defined as another class which holds the necessary information for a ball and create the object of this class to send ball information to the second computer.

Java 100.00%

servergame's Introduction

ServerGame

The Server part of the project Two Boxes with Balls. Balls are bouncing inside rectangular container boxes. This program is running on two computers. If the ball touches the right side border of the first box, it will emerge from the left side border of the second box.Used different colors for balls which run on different computers. When a ball touches the right side border, It will capture current attributes of this ball object and send this information using sockets to the ball bouncing program which is running on the second computer. This program will create a ball object with the variables received from the first computer. The ball object on the first computer should be destroyed. The first computer is the client and the second computer is the server. You can also run the client and server program on the same computer. Two programs are slightly different, the first program includes the client code and the second program includes the server code.Since the ball class includes Graphics class, we can not serialize the ball object and send it to the second computer. It should be defined as another class which holds the necessary information for a ball and create the object of this class to send ball information to the second computer.

servergame's People

Contributors

karya55 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.