Skip to content

Instantly share code, notes, and snippets.

View ChunChunMorning's full-sized avatar

あさちゅん ChunChunMorning

View GitHub Profile
@ChunChunMorning
ChunChunMorning / Main.cpp
Created September 20, 2017 11:23
10時間ゲームジャム テーマ「格闘」
# include <Siv3D.hpp>
# include <HamFramework.hpp>
void Main()
{
Window::SetTitle(L"Dum Dum Fighting");
Graphics::SetBackground(Palette::Skyblue);
ScalableWindow::Setup();
const Font font(40);
@ChunChunMorning
ChunChunMorning / Main.cpp
Last active September 13, 2017 13:35
7時間ハッカソン テーマ「波」
# include <Siv3D.hpp>
# include <HamFramework.hpp>
void Main()
{
Window::SetTitle(L"Before Momotaro");
Graphics::SetBackground(Palette::Green);
Graphics::SetTargetFrameRateHz(60);
m_Rigidbody.velocity = z * transform.forward + x * transform.right;
@ChunChunMorning
ChunChunMorning / Main.cpp
Created August 1, 2017 13:54
Siv3D FileArchive
# include <Siv3D.hpp>
void Main()
{
const auto args = CommandLine::Get();
if (args.size() < 2)
{
return;
}
# include <stdio.h>
# include <limits.h>
# define N 6
int matrix[N][N] = {
{ 0, 10, 10, -1, -1, -1 },
{ 10, 0, 10, 8, -1, -1 },
{ 10, 10, 0, -1, 10, -1 },
{ -1, 8, -1, 0, -1, 8 },
{ -1, -1, 10, -1, 0, 10 },
# include <stdio.h>
# include <limits.h>
# define NODE_NUM 6
# define MAX_CONNECTION_NUM 10
struct node_t;
struct node_connect_t
{
require "socket"
server = TCPServer.open("127.0.0.1", 50000);
puts "Server is running at 50000."
loop {
begin
parent = server.accept();
puts("Parent come\n");
# include <Siv3D.hpp>
# include <HamFramework.hpp>
# include "asc/TCPString.hpp"
struct GameData
{
asc::TCPStringClient client;
};
class Connecting : public SceneBase<String, GameData>
require "socket"
server = TCPServer.open("127.0.0.1", 50000);
puts "Server is running at 50000."
loop {
begin
parent = server.accept();
# 中略
threads << Thread.new {
loop {
message = parent.gets();
if (message.nil?())
break;
end