This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.7; | |
contract Hello { | |
function hello(string memory name) public pure returns (string memory) { | |
return string(bytes.concat("hello, ", bytes(name), "!")); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//replace http://agar.io/main_out.js by this file | |
//with Fiddler Web Debugger (AutoResponder tab) | |
//bots can be created in different rooms - so try restart the page if need | |
var totalBotCount = 0; | |
function game(h, r, bot, botUrl, botName) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is java websockets exapmle: | |
Files: | |
- 01_GameServer.java - start server with Jetty Server inside | |
- 02_GameSocketServlet.java - mapping to ws://127.0.0.1:8210/gamestate url | |
- 03_GameSocket.java - handler of websocket connections | |
- 04_SocketPlayer.java - link between the server and the specific client | |
- 05_GameApp.java - the game engine | |
- 06_GameMap.java - map model | |
- 07_GameSession.java - game session with connected players | |
- 08_PlayerGameState.java - player's state in a session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ taglib tagdir="/WEB-INF/tags/util" prefix="util" %> | |
<%-- tag should be placed to Web-inf/tags/util/toJson.tag --%> | |
<script id="scheduleData" type="json-data"><util:toJson source="${schedule}"/></script> |