mirror of
https://github.com/tiennm99/caro.git
synced 2026-05-19 13:25:57 +00:00
refactor: rename packages org.nico.ratel.landlords -> com.miti99.caro.{common,server}
- Move all 11 shared sub-packages (channel, entity, enums, exception,
features, handler, helper, print, robot, transfer, utils) under
com.miti99.caro.common.
- Move server sub-packages (event, handler, proxy, timer) + SimpleServer
+ ServerContains under com.miti99.caro.server.
- Move tests under com.miti99.caro.common.{helper,robot}.tests.
- Rewrite package declarations and imports across all 58 .java files via
regex script (server rules applied before common to avoid overlap).
- Update <mainClass> in server/pom.xml to com.miti99.caro.server.SimpleServer.
- Update .proto files' package + java_package to com.miti99.caro.common.entity
(for future regeneration).
- Fix generate.sh relative output path (common/ no longer exists).
- Include rewrite-packages.py script under plans/ for auditability.
Note: protoc-generated ClientTransferData.java / ServerTransferData.java
retain internal_static_* variable names and embedded descriptor byte strings
with the old package — these are implementation details that do not affect
the public Java package and preserve protobuf wire compatibility.
Validation: mvn -f server/pom.xml clean verify on Java 25 — all 37 tests
pass (29 GomokuHelperTest + 8 GomokuAITest).
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
"""One-shot package rewriter: org.nico.ratel.landlords.* -> com.miti99.caro.{common,server}.*.
|
||||
|
||||
Rules (order matters — server rules first so they don't get absorbed by common):
|
||||
- org.nico.ratel.landlords.server -> com.miti99.caro.server
|
||||
- org.nico.ratel.landlords -> com.miti99.caro.common
|
||||
|
||||
Touches: package declarations, imports, and any fully-qualified references in code/strings.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import pathlib
|
||||
import re
|
||||
import sys
|
||||
|
||||
ROOT = pathlib.Path(__file__).resolve().parents[2] / "server" / "src"
|
||||
|
||||
# Server rule must precede common rule (otherwise landlords.server.X becomes common.server.X).
|
||||
REPLACEMENTS = [
|
||||
(re.compile(r"org\.nico\.ratel\.landlords\.server"), "com.miti99.caro.server"),
|
||||
(re.compile(r"org\.nico\.ratel\.landlords"), "com.miti99.caro.common"),
|
||||
]
|
||||
|
||||
|
||||
def rewrite(path: pathlib.Path) -> bool:
|
||||
text = path.read_text(encoding="utf-8")
|
||||
new = text
|
||||
for pattern, repl in REPLACEMENTS:
|
||||
new = pattern.sub(repl, new)
|
||||
if new != text:
|
||||
path.write_text(new, encoding="utf-8")
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def main() -> int:
|
||||
files = sorted(ROOT.rglob("*.java"))
|
||||
if not files:
|
||||
print(f"no .java files under {ROOT}", file=sys.stderr)
|
||||
return 1
|
||||
changed = 0
|
||||
for f in files:
|
||||
if rewrite(f):
|
||||
changed += 1
|
||||
print(f"rewrote {changed}/{len(files)} files")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
<properties>
|
||||
<maven.compiler.release>25</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<main.class>org.nico.ratel.landlords.server.SimpleServer</main.class>
|
||||
<main.class>com.miti99.caro.server.SimpleServer</main.class>
|
||||
|
||||
<netty.version>4.1.115.Final</netty.version>
|
||||
<protobuf.version>3.25.5</protobuf.version>
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package org.nico.ratel.landlords.channel;
|
||||
package com.miti99.caro.common.channel;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientTransferData;
|
||||
import org.nico.ratel.landlords.entity.Msg;
|
||||
import org.nico.ratel.landlords.entity.ServerTransferData;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.entity.ClientTransferData;
|
||||
import com.miti99.caro.common.entity.Msg;
|
||||
import com.miti99.caro.common.entity.ServerTransferData;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.enums.GameResult;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.GameResult;
|
||||
|
||||
public class Board {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
|
||||
+48
-48
@@ -1,7 +1,7 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: ClientTransferDataProtoc.proto
|
||||
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
public final class ClientTransferData {
|
||||
private ClientTransferData() {}
|
||||
@@ -15,7 +15,7 @@ public final class ClientTransferData {
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
public interface ClientTransferDataProtocOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.nico.ratel.landlords.entity.ClientTransferDataProtoc)
|
||||
// @@protoc_insertion_point(interface_extends:com.miti99.caro.common.entity.ClientTransferDataProtoc)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
@@ -49,11 +49,11 @@ public final class ClientTransferData {
|
||||
getInfoBytes();
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code org.nico.ratel.landlords.entity.ClientTransferDataProtoc}
|
||||
* Protobuf type {@code com.miti99.caro.common.entity.ClientTransferDataProtoc}
|
||||
*/
|
||||
public static final class ClientTransferDataProtoc extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:org.nico.ratel.landlords.entity.ClientTransferDataProtoc)
|
||||
// @@protoc_insertion_point(message_implements:com.miti99.caro.common.entity.ClientTransferDataProtoc)
|
||||
ClientTransferDataProtocOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use ClientTransferDataProtoc.newBuilder() to construct.
|
||||
@@ -129,15 +129,15 @@ public final class ClientTransferData {
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_fieldAccessorTable
|
||||
return com.miti99.caro.common.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.class, org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.Builder.class);
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.class, com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.Builder.class);
|
||||
}
|
||||
|
||||
public static final int CODE_FIELD_NUMBER = 1;
|
||||
@@ -293,10 +293,10 @@ public final class ClientTransferData {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc)) {
|
||||
if (!(obj instanceof com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc other = (org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc) obj;
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc other = (com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getCode()
|
||||
@@ -327,69 +327,69 @@ public final class ClientTransferData {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(byte[] data)
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(java.io.InputStream input)
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseDelimitedFrom(java.io.InputStream input)
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseDelimitedFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
@@ -402,7 +402,7 @@ public final class ClientTransferData {
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc prototype) {
|
||||
public static Builder newBuilder(com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
@java.lang.Override
|
||||
@@ -418,26 +418,26 @@ public final class ClientTransferData {
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code org.nico.ratel.landlords.entity.ClientTransferDataProtoc}
|
||||
* Protobuf type {@code com.miti99.caro.common.entity.ClientTransferDataProtoc}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:org.nico.ratel.landlords.entity.ClientTransferDataProtoc)
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtocOrBuilder {
|
||||
// @@protoc_insertion_point(builder_implements:com.miti99.caro.common.entity.ClientTransferDataProtoc)
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtocOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_fieldAccessorTable
|
||||
return com.miti99.caro.common.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.class, org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.Builder.class);
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.class, com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.newBuilder()
|
||||
// Construct using com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
@@ -467,17 +467,17 @@ public final class ClientTransferData {
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ClientTransferData.internal_static_org_nico_ratel_landlords_entity_ClientTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstanceForType() {
|
||||
return org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.getDefaultInstance();
|
||||
public com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstanceForType() {
|
||||
return com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc build() {
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc result = buildPartial();
|
||||
public com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc build() {
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
@@ -485,8 +485,8 @@ public final class ClientTransferData {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc buildPartial() {
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc result = new org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc(this);
|
||||
public com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc buildPartial() {
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc result = new com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc(this);
|
||||
result.code_ = code_;
|
||||
result.data_ = data_;
|
||||
result.info_ = info_;
|
||||
@@ -528,16 +528,16 @@ public final class ClientTransferData {
|
||||
}
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc) {
|
||||
return mergeFrom((org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc)other);
|
||||
if (other instanceof com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc) {
|
||||
return mergeFrom((com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc other) {
|
||||
if (other == org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc.getDefaultInstance()) return this;
|
||||
public Builder mergeFrom(com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc other) {
|
||||
if (other == com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc.getDefaultInstance()) return this;
|
||||
if (!other.getCode().isEmpty()) {
|
||||
code_ = other.code_;
|
||||
onChanged();
|
||||
@@ -565,11 +565,11 @@ public final class ClientTransferData {
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc parsedMessage = null;
|
||||
com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc) e.getUnfinishedMessage();
|
||||
parsedMessage = (com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
@@ -798,16 +798,16 @@ public final class ClientTransferData {
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.nico.ratel.landlords.entity.ClientTransferDataProtoc)
|
||||
// @@protoc_insertion_point(builder_scope:com.miti99.caro.common.entity.ClientTransferDataProtoc)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.nico.ratel.landlords.entity.ClientTransferDataProtoc)
|
||||
private static final org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc DEFAULT_INSTANCE;
|
||||
// @@protoc_insertion_point(class_scope:com.miti99.caro.common.entity.ClientTransferDataProtoc)
|
||||
private static final com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc();
|
||||
DEFAULT_INSTANCE = new com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc();
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstance() {
|
||||
public static com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ public final class ClientTransferData {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstanceForType() {
|
||||
public com.miti99.caro.common.entity.ClientTransferData.ClientTransferDataProtoc getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
|
||||
public class GameMove {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
public class Msg {
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
@@ -6,9 +6,9 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomType;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.RoomType;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
|
||||
public class Room {
|
||||
|
||||
+48
-48
@@ -1,7 +1,7 @@
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: ServerTransferDataProtoc.proto
|
||||
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
public final class ServerTransferData {
|
||||
private ServerTransferData() {
|
||||
@@ -18,7 +18,7 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
public interface ServerTransferDataProtocOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.nico.ratel.landlords.entity.ServerTransferDataProtoc)
|
||||
// @@protoc_insertion_point(interface_extends:com.miti99.caro.common.entity.ServerTransferDataProtoc)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
@@ -56,11 +56,11 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code org.nico.ratel.landlords.entity.ServerTransferDataProtoc}
|
||||
* Protobuf type {@code com.miti99.caro.common.entity.ServerTransferDataProtoc}
|
||||
*/
|
||||
public static final class ServerTransferDataProtoc extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:org.nico.ratel.landlords.entity.ServerTransferDataProtoc)
|
||||
// @@protoc_insertion_point(message_implements:com.miti99.caro.common.entity.ServerTransferDataProtoc)
|
||||
ServerTransferDataProtocOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
@@ -140,15 +140,15 @@ public final class ServerTransferData {
|
||||
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_fieldAccessorTable
|
||||
return com.miti99.caro.common.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.class, org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.Builder.class);
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.class, com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.Builder.class);
|
||||
}
|
||||
|
||||
public static final int CODE_FIELD_NUMBER = 1;
|
||||
@@ -311,10 +311,10 @@ public final class ServerTransferData {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc)) {
|
||||
if (!(obj instanceof com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc other = (org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc) obj;
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc other = (com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getCode()
|
||||
@@ -345,51 +345,51 @@ public final class ServerTransferData {
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(byte[] data)
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(java.io.InputStream input)
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
@@ -397,13 +397,13 @@ public final class ServerTransferData {
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseDelimitedFrom(java.io.InputStream input)
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseDelimitedFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
@@ -411,14 +411,14 @@ public final class ServerTransferData {
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
@@ -435,7 +435,7 @@ public final class ServerTransferData {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
|
||||
public static Builder newBuilder(org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc prototype) {
|
||||
public static Builder newBuilder(com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
|
||||
@@ -453,26 +453,26 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
/**
|
||||
* Protobuf type {@code org.nico.ratel.landlords.entity.ServerTransferDataProtoc}
|
||||
* Protobuf type {@code com.miti99.caro.common.entity.ServerTransferDataProtoc}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:org.nico.ratel.landlords.entity.ServerTransferDataProtoc)
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtocOrBuilder {
|
||||
// @@protoc_insertion_point(builder_implements:com.miti99.caro.common.entity.ServerTransferDataProtoc)
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtocOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_fieldAccessorTable
|
||||
return com.miti99.caro.common.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.class, org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.Builder.class);
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.class, com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.newBuilder()
|
||||
// Construct using com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
@@ -504,17 +504,17 @@ public final class ServerTransferData {
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
return com.miti99.caro.common.entity.ServerTransferData.internal_static_org_nico_ratel_landlords_entity_ServerTransferDataProtoc_descriptor;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstanceForType() {
|
||||
return org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.getDefaultInstance();
|
||||
public com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstanceForType() {
|
||||
return com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.getDefaultInstance();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc build() {
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc result = buildPartial();
|
||||
public com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc build() {
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
@@ -522,8 +522,8 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc buildPartial() {
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc result = new org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc(this);
|
||||
public com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc buildPartial() {
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc result = new com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc(this);
|
||||
result.code_ = code_;
|
||||
result.data_ = data_;
|
||||
result.info_ = info_;
|
||||
@@ -571,16 +571,16 @@ public final class ServerTransferData {
|
||||
|
||||
@java.lang.Override
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc) {
|
||||
return mergeFrom((org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc) other);
|
||||
if (other instanceof com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc) {
|
||||
return mergeFrom((com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc) other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc other) {
|
||||
if (other == org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc.getDefaultInstance())
|
||||
public Builder mergeFrom(com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc other) {
|
||||
if (other == com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc.getDefaultInstance())
|
||||
return this;
|
||||
if (!other.getCode().isEmpty()) {
|
||||
code_ = other.code_;
|
||||
@@ -609,11 +609,11 @@ public final class ServerTransferData {
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc parsedMessage = null;
|
||||
com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc) e.getUnfinishedMessage();
|
||||
parsedMessage = (com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
@@ -858,17 +858,17 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.nico.ratel.landlords.entity.ServerTransferDataProtoc)
|
||||
// @@protoc_insertion_point(builder_scope:com.miti99.caro.common.entity.ServerTransferDataProtoc)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.nico.ratel.landlords.entity.ServerTransferDataProtoc)
|
||||
private static final org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc DEFAULT_INSTANCE;
|
||||
// @@protoc_insertion_point(class_scope:com.miti99.caro.common.entity.ServerTransferDataProtoc)
|
||||
private static final com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc DEFAULT_INSTANCE;
|
||||
|
||||
static {
|
||||
DEFAULT_INSTANCE = new org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc();
|
||||
DEFAULT_INSTANCE = new com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc();
|
||||
}
|
||||
|
||||
public static org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstance() {
|
||||
public static com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
@@ -893,7 +893,7 @@ public final class ServerTransferData {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstanceForType() {
|
||||
public com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum ClientRole {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum ClientStatus {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum GameResult {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum PieceType {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum RoomStatus {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
public enum RoomType {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.enums;
|
||||
package com.miti99.caro.common.enums;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.exception;
|
||||
package com.miti99.caro.common.exception;
|
||||
|
||||
public class LandlordException extends RuntimeException {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.features;
|
||||
package com.miti99.caro.common.features;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package org.nico.ratel.landlords.handler;
|
||||
package com.miti99.caro.common.handler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.nico.ratel.landlords.transfer.TransferProtocolUtils;
|
||||
import com.miti99.caro.common.transfer.TransferProtocolUtils;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package org.nico.ratel.landlords.helper;
|
||||
package com.miti99.caro.common.helper;
|
||||
|
||||
import org.nico.ratel.landlords.entity.Board;
|
||||
import org.nico.ratel.landlords.entity.GameMove;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.enums.GameResult;
|
||||
import com.miti99.caro.common.entity.Board;
|
||||
import com.miti99.caro.common.entity.GameMove;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.GameResult;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
package org.nico.ratel.landlords.helper;
|
||||
package com.miti99.caro.common.helper;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
public class MapHelper {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.helper;
|
||||
package com.miti99.caro.common.helper;
|
||||
|
||||
/**
|
||||
* @author nico
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.print;
|
||||
package com.miti99.caro.common.print;
|
||||
|
||||
public class FormatPrinter {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.print;
|
||||
package com.miti99.caro.common.print;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.print;
|
||||
package com.miti99.caro.common.print;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package org.nico.ratel.landlords.robot;
|
||||
package com.miti99.caro.common.robot;
|
||||
|
||||
import org.nico.ratel.landlords.entity.Board;
|
||||
import org.nico.ratel.landlords.entity.GameMove;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import com.miti99.caro.common.entity.Board;
|
||||
import com.miti99.caro.common.entity.GameMove;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.transfer;
|
||||
package com.miti99.caro.common.transfer;
|
||||
|
||||
/**
|
||||
* Byte manipulation tool
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.transfer;
|
||||
package com.miti99.caro.common.transfer;
|
||||
|
||||
public class ByteLink {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.nico.ratel.landlords.transfer;
|
||||
package com.miti99.caro.common.transfer;
|
||||
|
||||
import org.nico.ratel.landlords.exception.LandlordException;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.exception.LandlordException;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
/**
|
||||
* Protocol transport related tools
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.utils;
|
||||
package com.miti99.caro.common.utils;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.utils;
|
||||
package com.miti99.caro.common.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.utils;
|
||||
package com.miti99.caro.common.utils;
|
||||
|
||||
public class OptionsUtils {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.utils;
|
||||
package com.miti99.caro.common.utils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.server;
|
||||
package com.miti99.caro.server;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -8,8 +8,8 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
|
||||
public class ServerContains {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.nico.ratel.landlords.server;
|
||||
package com.miti99.caro.server;
|
||||
|
||||
import org.nico.ratel.landlords.server.proxy.ProtobufProxy;
|
||||
import org.nico.ratel.landlords.server.proxy.WebsocketProxy;
|
||||
import com.miti99.caro.server.proxy.ProtobufProxy;
|
||||
import com.miti99.caro.server.proxy.WebsocketProxy;
|
||||
|
||||
public class SimpleServer {
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
|
||||
public interface ServerEventListener {
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface ServerEventListener {
|
||||
|
||||
Map<ServerEventCode, ServerEventListener> LISTENER_MAP = new HashMap<>();
|
||||
|
||||
String LISTENER_PREFIX = "org.nico.ratel.landlords.server.event.ServerEventListener_";
|
||||
String LISTENER_PREFIX = "com.miti99.caro.server.event.ServerEventListener_";
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
static ServerEventListener get(ServerEventCode code) {
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_CLIENT_EXIT implements ServerEventListener {
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_CLIENT_NICKNAME_SET implements ServerEventListener {
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_CLIENT_OFFLINE implements ServerEventListener {
|
||||
|
||||
+14
-14
@@ -1,18 +1,18 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Board;
|
||||
import org.nico.ratel.landlords.entity.GameMove;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.GameResult;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.enums.RoomType;
|
||||
import org.nico.ratel.landlords.helper.GomokuHelper;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.robot.GomokuAI;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Board;
|
||||
import com.miti99.caro.common.entity.GameMove;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.GameResult;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.RoomType;
|
||||
import com.miti99.caro.common.helper.GomokuHelper;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.common.robot.GomokuAI;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
+10
-10
@@ -1,14 +1,14 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_GAME_READY implements ServerEventListener {
|
||||
|
||||
+11
-11
@@ -1,17 +1,17 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_GAME_STARTING implements ServerEventListener {
|
||||
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_GAME_WATCH_EXIT implements ServerEventListener {
|
||||
|
||||
+8
-8
@@ -1,17 +1,17 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
public class ServerEventListener_CODE_GET_ROOMS implements ServerEventListener {
|
||||
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomType;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.RoomType;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
public class ServerEventListener_CODE_ROOM_CREATE implements ServerEventListener {
|
||||
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomType;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.RoomType;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_ROOM_CREATE_PVE implements ServerEventListener {
|
||||
|
||||
+10
-10
@@ -1,16 +1,16 @@
|
||||
package org.nico.ratel.landlords.server.event;
|
||||
package com.miti99.caro.server.event;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.helper.MapHelper;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.helper.MapHelper;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
|
||||
public class ServerEventListener_CODE_ROOM_JOIN implements ServerEventListener {
|
||||
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
package org.nico.ratel.landlords.server.handler;
|
||||
package com.miti99.caro.server.handler;
|
||||
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.server.event.ServerEventListener;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.server.event.ServerEventListener;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package org.nico.ratel.landlords.server.handler;
|
||||
package com.miti99.caro.server.handler;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
import com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
|
||||
import com.google.protobuf.MessageLite;
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.server.handler;
|
||||
package com.miti99.caro.server.handler;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
@@ -8,18 +8,18 @@ import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
||||
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
||||
import io.netty.handler.timeout.IdleState;
|
||||
import io.netty.handler.timeout.IdleStateEvent;
|
||||
import org.nico.ratel.landlords.channel.ChannelUtils;
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Msg;
|
||||
import org.nico.ratel.landlords.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
import org.nico.ratel.landlords.enums.ClientEventCode;
|
||||
import org.nico.ratel.landlords.enums.ClientRole;
|
||||
import org.nico.ratel.landlords.enums.ClientStatus;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.server.event.ServerEventListener;
|
||||
import org.nico.ratel.landlords.utils.JsonUtils;
|
||||
import com.miti99.caro.common.channel.ChannelUtils;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Msg;
|
||||
import com.miti99.caro.common.entity.ServerTransferData.ServerTransferDataProtoc;
|
||||
import com.miti99.caro.common.enums.ClientEventCode;
|
||||
import com.miti99.caro.common.enums.ClientRole;
|
||||
import com.miti99.caro.common.enums.ClientStatus;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.server.event.ServerEventListener;
|
||||
import com.miti99.caro.common.utils.JsonUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
+7
-7
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.server.proxy;
|
||||
package com.miti99.caro.server.proxy;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
@@ -15,13 +15,13 @@ import io.netty.handler.codec.protobuf.ProtobufEncoder;
|
||||
import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder;
|
||||
import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender;
|
||||
import io.netty.handler.timeout.IdleStateHandler;
|
||||
import org.nico.ratel.landlords.entity.ServerTransferData;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import com.miti99.caro.common.entity.ServerTransferData;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.server.handler.SecondProtobufCodec;
|
||||
import org.nico.ratel.landlords.server.handler.ProtobufTransferHandler;
|
||||
import org.nico.ratel.landlords.server.timer.RoomClearTask;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.server.handler.SecondProtobufCodec;
|
||||
import com.miti99.caro.server.handler.ProtobufTransferHandler;
|
||||
import com.miti99.caro.server.timer.RoomClearTask;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Timer;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.server.proxy;
|
||||
package com.miti99.caro.server.proxy;
|
||||
|
||||
public interface Proxy {
|
||||
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
package org.nico.ratel.landlords.server.proxy;
|
||||
package com.miti99.caro.server.proxy;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
@@ -15,12 +15,12 @@ import io.netty.handler.codec.http.HttpServerCodec;
|
||||
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
||||
import io.netty.handler.stream.ChunkedWriteHandler;
|
||||
import io.netty.handler.timeout.IdleStateHandler;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.server.handler.ProtobufTransferHandler;
|
||||
import org.nico.ratel.landlords.server.handler.WebsocketTransferHandler;
|
||||
import org.nico.ratel.landlords.server.timer.RoomClearTask;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.server.handler.ProtobufTransferHandler;
|
||||
import com.miti99.caro.server.handler.WebsocketTransferHandler;
|
||||
import com.miti99.caro.server.timer.RoomClearTask;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Timer;
|
||||
+8
-8
@@ -1,15 +1,15 @@
|
||||
package org.nico.ratel.landlords.server.timer;
|
||||
package com.miti99.caro.server.timer;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import org.nico.ratel.landlords.entity.ClientSide;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.RoomStatus;
|
||||
import org.nico.ratel.landlords.enums.ServerEventCode;
|
||||
import org.nico.ratel.landlords.print.SimplePrinter;
|
||||
import org.nico.ratel.landlords.server.ServerContains;
|
||||
import org.nico.ratel.landlords.server.event.ServerEventListener;
|
||||
import com.miti99.caro.common.entity.ClientSide;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.RoomStatus;
|
||||
import com.miti99.caro.common.enums.ServerEventCode;
|
||||
import com.miti99.caro.common.print.SimplePrinter;
|
||||
import com.miti99.caro.server.ServerContains;
|
||||
import com.miti99.caro.server.event.ServerEventListener;
|
||||
|
||||
/**
|
||||
* Periodically cleans up idle or expired rooms.
|
||||
@@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
option java_package = "org.nico.ratel.landlords.entity";
|
||||
option java_package = "com.miti99.caro.common.entity";
|
||||
option java_outer_classname = "ClientTransferData";
|
||||
|
||||
message ClientTransferDataProtoc{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package org.nico.ratel.landlords.entity;
|
||||
package com.miti99.caro.common.entity;
|
||||
|
||||
option java_package = "org.nico.ratel.landlords.entity";
|
||||
option java_package = "com.miti99.caro.common.entity";
|
||||
option java_outer_classname = "ServerTransferData";
|
||||
|
||||
message ServerTransferDataProtoc{
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
protoc -I=. --java_out=../landlords-common/src/main/java/ ./*.proto
|
||||
#!/usr/bin/env bash
|
||||
# Regenerate protobuf Java classes from .proto files.
|
||||
# Run from server/src/main/resources/proto/ directory.
|
||||
protoc -I=. --java_out=../../../java/ ./*.proto
|
||||
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
package org.nico.ratel.landlords.helper.tests;
|
||||
package com.miti99.caro.common.helper.tests;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.nico.ratel.landlords.entity.Board;
|
||||
import org.nico.ratel.landlords.entity.Room;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.enums.GameResult;
|
||||
import org.nico.ratel.landlords.helper.GomokuHelper;
|
||||
import com.miti99.caro.common.entity.Board;
|
||||
import com.miti99.caro.common.entity.Room;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.enums.GameResult;
|
||||
import com.miti99.caro.common.helper.GomokuHelper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
+5
-5
@@ -1,10 +1,10 @@
|
||||
package org.nico.ratel.landlords.robot.tests;
|
||||
package com.miti99.caro.common.robot.tests;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.nico.ratel.landlords.entity.Board;
|
||||
import org.nico.ratel.landlords.entity.GameMove;
|
||||
import org.nico.ratel.landlords.enums.PieceType;
|
||||
import org.nico.ratel.landlords.robot.GomokuAI;
|
||||
import com.miti99.caro.common.entity.Board;
|
||||
import com.miti99.caro.common.entity.GameMove;
|
||||
import com.miti99.caro.common.enums.PieceType;
|
||||
import com.miti99.caro.common.robot.GomokuAI;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
Reference in New Issue
Block a user