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
class Game : public SceneBase<String, GameData> | |
{ | |
private: | |
bool isParent; | |
bool isSendGoal; | |
Rect leftBar; | |
int leftBarSpeed; | |
Rect rightBar; | |
int rightBarSpeed; |
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
# 中略 | |
parent = server.accept(); | |
puts("Parent come\n"); | |
parent.write("welcome\n"); | |
child = server.accept(); | |
puts("Child come\n"); | |
time = Time.now.to_i + 3; |
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
class Waiting : public SceneBase<String, GameData> | |
{ | |
private: | |
Font font; | |
Optional<int64> time; | |
String buffer; | |
public: |
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
require "socket" | |
server = TCPServer.open("127.0.0.1", 50000); | |
puts "Server is running at 50000." | |
parent = server.accept(); | |
puts("Parent come\n"); | |
parent.write("welcome\n"); |
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
# include <Siv3D.hpp> | |
# include <HamFramework.hpp> | |
# include "asc/TCPString.hpp" | |
struct GameData | |
{ | |
asc::TCPStringClient client; | |
}; | |
class Connecting : public SceneBase<String, GameData> |
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
require "socket" | |
server = TCPServer.open("127.0.0.1", 50000); | |
puts "Server is running at 50000." | |
socket = server.accept(); | |
socket.write("welcome\n"); | |
loop { |
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
class Game : public SceneBase<String, GameData> | |
{ | |
private: | |
Rect leftBar; | |
int leftBarSpeed; | |
Rect rightBar; | |
int rightBarSpeed; | |
Circle ball; | |
Vec2 ballSpeed; |
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
# include <Siv3D.hpp> | |
# include <HamFramework.hpp> | |
struct GameData | |
{ | |
}; | |
class Connecting : public SceneBase<String, GameData> | |
{ |
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
# include <Siv3D.hpp> | |
# include <HamFramework.hpp> | |
# include "asc/TCPString.hpp" | |
struct GameData | |
{ | |
asc::TCPStringClient client; | |
}; | |
class Connecting : public SceneBase<String, GameData> |
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
require 'socket' | |
server = TCPServer.open '127.0.0.1', 50000 | |
puts 'Server is running' | |
socket = server.accept | |
loop do | |
str = socket.gets |