├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── README.md │ ├── codeql-analysis.yml │ ├── mirror.yml │ └── upload_deploy.yml ├── .gitignore ├── CAPI ├── .gitattributes ├── .gitignore ├── API │ ├── .gitignore │ ├── API.vcxproj │ ├── API.vcxproj.filters │ ├── include │ │ ├── AI.h │ │ ├── API.h │ │ ├── constants.h │ │ ├── logic.h │ │ ├── state.h │ │ ├── structures.h │ │ └── utils.hpp │ ├── packages.config │ └── src │ │ ├── AI.cpp │ │ ├── API.cpp │ │ ├── DebugAPI.cpp │ │ ├── logic.cpp │ │ └── main.cpp ├── CAPI.md ├── CAPI.sln ├── CMakeLists.txt ├── Client.cmd ├── Communication │ ├── .gitignore │ ├── Communication.vcxproj │ ├── Communication.vcxproj.filters │ ├── include │ │ └── Communication.h │ └── src │ │ └── Communication.cpp ├── Development.md ├── HPSocket │ ├── linux │ │ ├── GlobalDef.h │ │ ├── GlobalErrno.h │ │ ├── HPSocket-SSL.h │ │ ├── HPSocket.h │ │ ├── HPSocket4C-SSL.h │ │ ├── HPSocket4C.h │ │ ├── HPTypeDef.h │ │ └── SocketInterface.h │ └── win │ │ ├── HPSocket-SSL.h │ │ ├── HPSocket.h │ │ ├── HPSocket4C-SSL.h │ │ ├── HPSocket4C.h │ │ ├── HPTypeDef.h │ │ └── SocketInterface.h ├── README.md ├── Tool_tutorial.md ├── bash │ ├── .gitignore │ ├── Client_1.sh │ ├── Client_2.sh │ └── Client_8.sh ├── cmd │ ├── Client_1.cmd │ ├── Client_1_debug.cmd │ ├── Client_2.cmd │ ├── Client_2_debug.cmd │ ├── Client_8.cmd │ └── Client_8_debug.cmd ├── proto │ ├── Message2Clients.pb.cc │ ├── Message2Clients.pb.h │ ├── Message2Server.pb.cc │ ├── Message2Server.pb.h │ ├── MessageType.pb.cc │ └── MessageType.pb.h ├── protobuf │ ├── LICENSE │ └── src │ │ └── google │ │ └── protobuf │ │ ├── any.cc │ │ ├── any.h │ │ ├── any.pb.cc │ │ ├── any.pb.h │ │ ├── any.proto │ │ ├── any_lite.cc │ │ ├── any_test.cc │ │ ├── any_test.proto │ │ ├── api.pb.cc │ │ ├── api.pb.h │ │ ├── api.proto │ │ ├── arena.cc │ │ ├── arena.h │ │ ├── arena_impl.h │ │ ├── arena_test_util.cc │ │ ├── arena_test_util.h │ │ ├── arena_unittest.cc │ │ ├── arenastring.cc │ │ ├── arenastring.h │ │ ├── arenastring_unittest.cc │ │ ├── compiler │ │ ├── annotation_test_util.cc │ │ ├── annotation_test_util.h │ │ ├── code_generator.cc │ │ ├── code_generator.h │ │ ├── command_line_interface.cc │ │ ├── command_line_interface.h │ │ ├── command_line_interface_unittest.cc │ │ ├── cpp │ │ │ ├── cpp_bootstrap_unittest.cc │ │ │ ├── cpp_enum.cc │ │ │ ├── cpp_enum.h │ │ │ ├── cpp_enum_field.cc │ │ │ ├── cpp_enum_field.h │ │ │ ├── cpp_extension.cc │ │ │ ├── cpp_extension.h │ │ │ ├── cpp_field.cc │ │ │ ├── cpp_field.h │ │ │ ├── cpp_file.cc │ │ │ ├── cpp_file.h │ │ │ ├── cpp_generator.cc │ │ │ ├── cpp_generator.h │ │ │ ├── cpp_helpers.cc │ │ │ ├── cpp_helpers.h │ │ │ ├── cpp_map_field.cc │ │ │ ├── cpp_map_field.h │ │ │ ├── cpp_message.cc │ │ │ ├── cpp_message.h │ │ │ ├── cpp_message_field.cc │ │ │ ├── cpp_message_field.h │ │ │ ├── cpp_message_layout_helper.h │ │ │ ├── cpp_move_unittest.cc │ │ │ ├── cpp_names.h │ │ │ ├── cpp_options.h │ │ │ ├── cpp_padding_optimizer.cc │ │ │ ├── cpp_padding_optimizer.h │ │ │ ├── cpp_parse_function_generator.cc │ │ │ ├── cpp_parse_function_generator.h │ │ │ ├── cpp_plugin_unittest.cc │ │ │ ├── cpp_primitive_field.cc │ │ │ ├── cpp_primitive_field.h │ │ │ ├── cpp_service.cc │ │ │ ├── cpp_service.h │ │ │ ├── cpp_string_field.cc │ │ │ ├── cpp_string_field.h │ │ │ ├── cpp_test_bad_identifiers.proto │ │ │ ├── cpp_test_large_enum_value.proto │ │ │ ├── cpp_unittest.cc │ │ │ ├── cpp_unittest.h │ │ │ ├── cpp_unittest.inc │ │ │ └── metadata_test.cc │ │ ├── csharp │ │ │ ├── csharp_bootstrap_unittest.cc │ │ │ ├── csharp_doc_comment.cc │ │ │ ├── csharp_doc_comment.h │ │ │ ├── csharp_enum.cc │ │ │ ├── csharp_enum.h │ │ │ ├── csharp_enum_field.cc │ │ │ ├── csharp_enum_field.h │ │ │ ├── csharp_field_base.cc │ │ │ ├── csharp_field_base.h │ │ │ ├── csharp_generator.cc │ │ │ ├── csharp_generator.h │ │ │ ├── csharp_generator_unittest.cc │ │ │ ├── csharp_helpers.cc │ │ │ ├── csharp_helpers.h │ │ │ ├── csharp_map_field.cc │ │ │ ├── csharp_map_field.h │ │ │ ├── csharp_message.cc │ │ │ ├── csharp_message.h │ │ │ ├── csharp_message_field.cc │ │ │ ├── csharp_message_field.h │ │ │ ├── csharp_names.h │ │ │ ├── csharp_options.h │ │ │ ├── csharp_primitive_field.cc │ │ │ ├── csharp_primitive_field.h │ │ │ ├── csharp_reflection_class.cc │ │ │ ├── csharp_reflection_class.h │ │ │ ├── csharp_repeated_enum_field.cc │ │ │ ├── csharp_repeated_enum_field.h │ │ │ ├── csharp_repeated_message_field.cc │ │ │ ├── csharp_repeated_message_field.h │ │ │ ├── csharp_repeated_primitive_field.cc │ │ │ ├── csharp_repeated_primitive_field.h │ │ │ ├── csharp_source_generator_base.cc │ │ │ ├── csharp_source_generator_base.h │ │ │ ├── csharp_wrapper_field.cc │ │ │ └── csharp_wrapper_field.h │ │ ├── importer.cc │ │ ├── importer.h │ │ ├── importer_unittest.cc │ │ ├── java │ │ │ ├── java_context.cc │ │ │ ├── java_context.h │ │ │ ├── java_doc_comment.cc │ │ │ ├── java_doc_comment.h │ │ │ ├── java_doc_comment_unittest.cc │ │ │ ├── java_enum.cc │ │ │ ├── java_enum.h │ │ │ ├── java_enum_field.cc │ │ │ ├── java_enum_field.h │ │ │ ├── java_enum_field_lite.cc │ │ │ ├── java_enum_field_lite.h │ │ │ ├── java_enum_lite.cc │ │ │ ├── java_enum_lite.h │ │ │ ├── java_extension.cc │ │ │ ├── java_extension.h │ │ │ ├── java_extension_lite.cc │ │ │ ├── java_extension_lite.h │ │ │ ├── java_field.cc │ │ │ ├── java_field.h │ │ │ ├── java_file.cc │ │ │ ├── java_file.h │ │ │ ├── java_generator.cc │ │ │ ├── java_generator.h │ │ │ ├── java_generator_factory.cc │ │ │ ├── java_generator_factory.h │ │ │ ├── java_helpers.cc │ │ │ ├── java_helpers.h │ │ │ ├── java_kotlin_generator.cc │ │ │ ├── java_kotlin_generator.h │ │ │ ├── java_map_field.cc │ │ │ ├── java_map_field.h │ │ │ ├── java_map_field_lite.cc │ │ │ ├── java_map_field_lite.h │ │ │ ├── java_message.cc │ │ │ ├── java_message.h │ │ │ ├── java_message_builder.cc │ │ │ ├── java_message_builder.h │ │ │ ├── java_message_builder_lite.cc │ │ │ ├── java_message_builder_lite.h │ │ │ ├── java_message_field.cc │ │ │ ├── java_message_field.h │ │ │ ├── java_message_field_lite.cc │ │ │ ├── java_message_field_lite.h │ │ │ ├── java_message_lite.cc │ │ │ ├── java_message_lite.h │ │ │ ├── java_name_resolver.cc │ │ │ ├── java_name_resolver.h │ │ │ ├── java_names.h │ │ │ ├── java_options.h │ │ │ ├── java_plugin_unittest.cc │ │ │ ├── java_primitive_field.cc │ │ │ ├── java_primitive_field.h │ │ │ ├── java_primitive_field_lite.cc │ │ │ ├── java_primitive_field_lite.h │ │ │ ├── java_service.cc │ │ │ ├── java_service.h │ │ │ ├── java_shared_code_generator.cc │ │ │ ├── java_shared_code_generator.h │ │ │ ├── java_string_field.cc │ │ │ ├── java_string_field.h │ │ │ ├── java_string_field_lite.cc │ │ │ └── java_string_field_lite.h │ │ ├── js │ │ │ ├── js_generator.cc │ │ │ ├── js_generator.h │ │ │ ├── well_known_types_embed.cc │ │ │ └── well_known_types_embed.h │ │ ├── main.cc │ │ ├── mock_code_generator.cc │ │ ├── mock_code_generator.h │ │ ├── objectivec │ │ │ ├── objectivec_enum.cc │ │ │ ├── objectivec_enum.h │ │ │ ├── objectivec_enum_field.cc │ │ │ ├── objectivec_enum_field.h │ │ │ ├── objectivec_extension.cc │ │ │ ├── objectivec_extension.h │ │ │ ├── objectivec_field.cc │ │ │ ├── objectivec_field.h │ │ │ ├── objectivec_file.cc │ │ │ ├── objectivec_file.h │ │ │ ├── objectivec_generator.cc │ │ │ ├── objectivec_generator.h │ │ │ ├── objectivec_helpers.cc │ │ │ ├── objectivec_helpers.h │ │ │ ├── objectivec_helpers_unittest.cc │ │ │ ├── objectivec_map_field.cc │ │ │ ├── objectivec_map_field.h │ │ │ ├── objectivec_message.cc │ │ │ ├── objectivec_message.h │ │ │ ├── objectivec_message_field.cc │ │ │ ├── objectivec_message_field.h │ │ │ ├── objectivec_nsobject_methods.h │ │ │ ├── objectivec_oneof.cc │ │ │ ├── objectivec_oneof.h │ │ │ ├── objectivec_primitive_field.cc │ │ │ └── objectivec_primitive_field.h │ │ ├── package_info.h │ │ ├── parser.cc │ │ ├── parser.h │ │ ├── parser_unittest.cc │ │ ├── php │ │ │ ├── php_generator.cc │ │ │ └── php_generator.h │ │ ├── plugin.cc │ │ ├── plugin.h │ │ ├── plugin.pb.cc │ │ ├── plugin.pb.h │ │ ├── plugin.proto │ │ ├── python │ │ │ ├── python_generator.cc │ │ │ ├── python_generator.h │ │ │ └── python_plugin_unittest.cc │ │ ├── ruby │ │ │ ├── ruby_generated_code.proto │ │ │ ├── ruby_generated_code_pb.rb │ │ │ ├── ruby_generated_code_proto2.proto │ │ │ ├── ruby_generated_code_proto2_import.proto │ │ │ ├── ruby_generated_code_proto2_pb.rb │ │ │ ├── ruby_generated_pkg_explicit.proto │ │ │ ├── ruby_generated_pkg_explicit_legacy.proto │ │ │ ├── ruby_generated_pkg_explicit_legacy_pb.rb │ │ │ ├── ruby_generated_pkg_explicit_pb.rb │ │ │ ├── ruby_generated_pkg_implicit.proto │ │ │ ├── ruby_generated_pkg_implicit_pb.rb │ │ │ ├── ruby_generator.cc │ │ │ ├── ruby_generator.h │ │ │ └── ruby_generator_unittest.cc │ │ ├── scc.h │ │ ├── subprocess.cc │ │ ├── subprocess.h │ │ ├── test_plugin.cc │ │ ├── zip_output_unittest.sh │ │ ├── zip_writer.cc │ │ └── zip_writer.h │ │ ├── descriptor.cc │ │ ├── descriptor.h │ │ ├── descriptor.pb.cc │ │ ├── descriptor.pb.h │ │ ├── descriptor.proto │ │ ├── descriptor_database.cc │ │ ├── descriptor_database.h │ │ ├── descriptor_database_unittest.cc │ │ ├── descriptor_unittest.cc │ │ ├── drop_unknown_fields_test.cc │ │ ├── duration.pb.cc │ │ ├── duration.pb.h │ │ ├── duration.proto │ │ ├── dynamic_message.cc │ │ ├── dynamic_message.h │ │ ├── dynamic_message_unittest.cc │ │ ├── empty.pb.cc │ │ ├── empty.pb.h │ │ ├── empty.proto │ │ ├── explicitly_constructed.h │ │ ├── extension_set.cc │ │ ├── extension_set.h │ │ ├── extension_set_heavy.cc │ │ ├── extension_set_inl.h │ │ ├── extension_set_unittest.cc │ │ ├── field_access_listener.h │ │ ├── field_mask.pb.cc │ │ ├── field_mask.pb.h │ │ ├── field_mask.proto │ │ ├── generated_enum_reflection.h │ │ ├── generated_enum_util.cc │ │ ├── generated_enum_util.h │ │ ├── generated_message_bases.cc │ │ ├── generated_message_bases.h │ │ ├── generated_message_reflection.cc │ │ ├── generated_message_reflection.h │ │ ├── generated_message_reflection_unittest.cc │ │ ├── generated_message_table_driven.cc │ │ ├── generated_message_table_driven.h │ │ ├── generated_message_table_driven_lite.cc │ │ ├── generated_message_table_driven_lite.h │ │ ├── generated_message_tctable_decl.h │ │ ├── generated_message_tctable_full.cc │ │ ├── generated_message_tctable_impl.h │ │ ├── generated_message_tctable_impl.inc │ │ ├── generated_message_tctable_lite.cc │ │ ├── generated_message_util.cc │ │ ├── generated_message_util.h │ │ ├── has_bits.h │ │ ├── implicit_weak_message.cc │ │ ├── implicit_weak_message.h │ │ ├── inlined_string_field.cc │ │ ├── inlined_string_field.h │ │ ├── inlined_string_field_unittest.cc │ │ ├── io │ │ ├── coded_stream.cc │ │ ├── coded_stream.h │ │ ├── coded_stream_unittest.cc │ │ ├── gzip_stream.cc │ │ ├── gzip_stream.h │ │ ├── gzip_stream_unittest.sh │ │ ├── io_win32.cc │ │ ├── io_win32.h │ │ ├── io_win32_unittest.cc │ │ ├── package_info.h │ │ ├── printer.cc │ │ ├── printer.h │ │ ├── printer_unittest.cc │ │ ├── strtod.cc │ │ ├── strtod.h │ │ ├── tokenizer.cc │ │ ├── tokenizer.h │ │ ├── tokenizer_unittest.cc │ │ ├── zero_copy_stream.cc │ │ ├── zero_copy_stream.h │ │ ├── zero_copy_stream_impl.cc │ │ ├── zero_copy_stream_impl.h │ │ ├── zero_copy_stream_impl_lite.cc │ │ ├── zero_copy_stream_impl_lite.h │ │ └── zero_copy_stream_unittest.cc │ │ ├── lite_arena_unittest.cc │ │ ├── lite_unittest.cc │ │ ├── map.cc │ │ ├── map.h │ │ ├── map_entry.h │ │ ├── map_entry_lite.h │ │ ├── map_field.cc │ │ ├── map_field.h │ │ ├── map_field_inl.h │ │ ├── map_field_lite.h │ │ ├── map_field_test.cc │ │ ├── map_lite_test_util.cc │ │ ├── map_lite_test_util.h │ │ ├── map_lite_unittest.proto │ │ ├── map_proto2_unittest.proto │ │ ├── map_test.cc │ │ ├── map_test.inc │ │ ├── map_test_util.h │ │ ├── map_test_util.inc │ │ ├── map_test_util_impl.h │ │ ├── map_type_handler.h │ │ ├── map_unittest.proto │ │ ├── message.cc │ │ ├── message.h │ │ ├── message_lite.cc │ │ ├── message_lite.h │ │ ├── message_unittest.cc │ │ ├── message_unittest.inc │ │ ├── metadata.h │ │ ├── metadata_lite.h │ │ ├── no_field_presence_test.cc │ │ ├── package_info.h │ │ ├── parse_context.cc │ │ ├── parse_context.h │ │ ├── port.h │ │ ├── port_def.inc │ │ ├── port_undef.inc │ │ ├── preserve_unknown_enum_test.cc │ │ ├── proto3_arena_lite_unittest.cc │ │ ├── proto3_arena_unittest.cc │ │ ├── proto3_lite_unittest.cc │ │ ├── proto3_lite_unittest.inc │ │ ├── reflection.h │ │ ├── reflection_internal.h │ │ ├── reflection_ops.cc │ │ ├── reflection_ops.h │ │ ├── reflection_ops_unittest.cc │ │ ├── reflection_tester.cc │ │ ├── reflection_tester.h │ │ ├── repeated_field.cc │ │ ├── repeated_field.h │ │ ├── repeated_field_reflection_unittest.cc │ │ ├── repeated_field_unittest.cc │ │ ├── repeated_ptr_field.cc │ │ ├── repeated_ptr_field.h │ │ ├── service.cc │ │ ├── service.h │ │ ├── source_context.pb.cc │ │ ├── source_context.pb.h │ │ ├── source_context.proto │ │ ├── string_member_robber.h │ │ ├── struct.pb.cc │ │ ├── struct.pb.h │ │ ├── struct.proto │ │ ├── stubs │ │ ├── bytestream.cc │ │ ├── bytestream.h │ │ ├── bytestream_unittest.cc │ │ ├── callback.h │ │ ├── casts.h │ │ ├── common.cc │ │ ├── common.h │ │ ├── common_unittest.cc │ │ ├── hash.h │ │ ├── int128.cc │ │ ├── int128.h │ │ ├── int128_unittest.cc │ │ ├── logging.h │ │ ├── macros.h │ │ ├── map_util.h │ │ ├── mathutil.h │ │ ├── mutex.h │ │ ├── once.h │ │ ├── platform_macros.h │ │ ├── port.h │ │ ├── status.cc │ │ ├── status.h │ │ ├── status_macros.h │ │ ├── status_test.cc │ │ ├── statusor.cc │ │ ├── statusor.h │ │ ├── statusor_test.cc │ │ ├── stl_util.h │ │ ├── stringpiece.cc │ │ ├── stringpiece.h │ │ ├── stringpiece_unittest.cc │ │ ├── stringprintf.cc │ │ ├── stringprintf.h │ │ ├── stringprintf_unittest.cc │ │ ├── structurally_valid.cc │ │ ├── structurally_valid_unittest.cc │ │ ├── strutil.cc │ │ ├── strutil.h │ │ ├── strutil_unittest.cc │ │ ├── substitute.cc │ │ ├── substitute.h │ │ ├── template_util.h │ │ ├── template_util_unittest.cc │ │ ├── time.cc │ │ ├── time.h │ │ └── time_test.cc │ │ ├── test_messages_proto2.proto │ │ ├── test_messages_proto3.proto │ │ ├── test_util.cc │ │ ├── test_util.h │ │ ├── test_util.inc │ │ ├── test_util2.h │ │ ├── test_util_lite.cc │ │ ├── test_util_lite.h │ │ ├── testdata │ │ ├── bad_utf8_string │ │ ├── golden_message │ │ ├── golden_message_maps │ │ ├── golden_message_oneof_implemented │ │ ├── golden_message_proto3 │ │ ├── golden_packed_fields_message │ │ ├── map_test_data.txt │ │ ├── text_format_unittest_data.txt │ │ ├── text_format_unittest_data_oneof_implemented.txt │ │ ├── text_format_unittest_data_pointy.txt │ │ ├── text_format_unittest_data_pointy_oneof.txt │ │ ├── text_format_unittest_extensions_data.txt │ │ └── text_format_unittest_extensions_data_pointy.txt │ │ ├── testing │ │ ├── file.cc │ │ ├── file.h │ │ ├── googletest.cc │ │ ├── googletest.h │ │ ├── zcgunzip.cc │ │ └── zcgzip.cc │ │ ├── text_format.cc │ │ ├── text_format.h │ │ ├── text_format_unittest.cc │ │ ├── timestamp.pb.cc │ │ ├── timestamp.pb.h │ │ ├── timestamp.proto │ │ ├── type.pb.cc │ │ ├── type.pb.h │ │ ├── type.proto │ │ ├── unittest.proto │ │ ├── unittest_arena.proto │ │ ├── unittest_custom_options.proto │ │ ├── unittest_drop_unknown_fields.proto │ │ ├── unittest_embed_optimize_for.proto │ │ ├── unittest_empty.proto │ │ ├── unittest_enormous_descriptor.proto │ │ ├── unittest_import.proto │ │ ├── unittest_import_lite.proto │ │ ├── unittest_import_public.proto │ │ ├── unittest_import_public_lite.proto │ │ ├── unittest_lazy_dependencies.proto │ │ ├── unittest_lazy_dependencies_custom_option.proto │ │ ├── unittest_lazy_dependencies_enum.proto │ │ ├── unittest_lite.proto │ │ ├── unittest_lite_imports_nonlite.proto │ │ ├── unittest_mset.proto │ │ ├── unittest_mset_wire_format.proto │ │ ├── unittest_no_field_presence.proto │ │ ├── unittest_no_generic_services.proto │ │ ├── unittest_optimize_for.proto │ │ ├── unittest_preserve_unknown_enum.proto │ │ ├── unittest_preserve_unknown_enum2.proto │ │ ├── unittest_proto3.proto │ │ ├── unittest_proto3_arena.proto │ │ ├── unittest_proto3_arena_lite.proto │ │ ├── unittest_proto3_lite.proto │ │ ├── unittest_proto3_optional.proto │ │ ├── unittest_well_known_types.proto │ │ ├── unknown_field_set.cc │ │ ├── unknown_field_set.h │ │ ├── unknown_field_set_unittest.cc │ │ ├── util │ │ ├── delimited_message_util.cc │ │ ├── delimited_message_util.h │ │ ├── delimited_message_util_test.cc │ │ ├── field_comparator.cc │ │ ├── field_comparator.h │ │ ├── field_comparator_test.cc │ │ ├── field_mask_util.cc │ │ ├── field_mask_util.h │ │ ├── field_mask_util_test.cc │ │ ├── internal │ │ │ ├── constants.h │ │ │ ├── datapiece.cc │ │ │ ├── datapiece.h │ │ │ ├── default_value_objectwriter.cc │ │ │ ├── default_value_objectwriter.h │ │ │ ├── default_value_objectwriter_test.cc │ │ │ ├── error_listener.cc │ │ │ ├── error_listener.h │ │ │ ├── expecting_objectwriter.h │ │ │ ├── field_mask_utility.cc │ │ │ ├── field_mask_utility.h │ │ │ ├── json_escaping.cc │ │ │ ├── json_escaping.h │ │ │ ├── json_objectwriter.cc │ │ │ ├── json_objectwriter.h │ │ │ ├── json_objectwriter_test.cc │ │ │ ├── json_stream_parser.cc │ │ │ ├── json_stream_parser.h │ │ │ ├── json_stream_parser_test.cc │ │ │ ├── location_tracker.h │ │ │ ├── mock_error_listener.h │ │ │ ├── object_location_tracker.h │ │ │ ├── object_source.h │ │ │ ├── object_writer.cc │ │ │ ├── object_writer.h │ │ │ ├── proto_writer.cc │ │ │ ├── proto_writer.h │ │ │ ├── protostream_objectsource.cc │ │ │ ├── protostream_objectsource.h │ │ │ ├── protostream_objectsource_test.cc │ │ │ ├── protostream_objectwriter.cc │ │ │ ├── protostream_objectwriter.h │ │ │ ├── protostream_objectwriter_test.cc │ │ │ ├── structured_objectwriter.h │ │ │ ├── testdata │ │ │ │ ├── anys.proto │ │ │ │ ├── books.proto │ │ │ │ ├── default_value.proto │ │ │ │ ├── default_value_test.proto │ │ │ │ ├── field_mask.proto │ │ │ │ ├── maps.proto │ │ │ │ ├── oneofs.proto │ │ │ │ ├── proto3.proto │ │ │ │ ├── struct.proto │ │ │ │ ├── timestamp_duration.proto │ │ │ │ └── wrappers.proto │ │ │ ├── type_info.cc │ │ │ ├── type_info.h │ │ │ ├── type_info_test_helper.cc │ │ │ ├── type_info_test_helper.h │ │ │ ├── utility.cc │ │ │ └── utility.h │ │ ├── json_format.proto │ │ ├── json_format_proto3.proto │ │ ├── json_util.cc │ │ ├── json_util.h │ │ ├── json_util_test.cc │ │ ├── message_differencer.cc │ │ ├── message_differencer.h │ │ ├── message_differencer_unittest.cc │ │ ├── message_differencer_unittest.proto │ │ ├── package_info.h │ │ ├── time_util.cc │ │ ├── time_util.h │ │ ├── time_util_test.cc │ │ ├── type_resolver.h │ │ ├── type_resolver_util.cc │ │ ├── type_resolver_util.h │ │ └── type_resolver_util_test.cc │ │ ├── well_known_types_unittest.cc │ │ ├── wire_format.cc │ │ ├── wire_format.h │ │ ├── wire_format_lite.cc │ │ ├── wire_format_lite.h │ │ ├── wire_format_unittest.cc │ │ ├── wire_format_unittest.inc │ │ ├── wrappers.pb.cc │ │ ├── wrappers.pb.h │ │ └── wrappers.proto ├── tclap │ ├── COPYING │ └── include │ │ └── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── Makefile.am │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ ├── ZshCompletionOutput.h │ │ └── sstream.h └── thuai │ └── include │ └── concurrent_queue.hpp ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── SECURITY.md ├── _config.yml ├── communication ├── .gitattributes ├── .gitignore ├── ClientCommunication │ ├── ClientCommunication.cs │ └── ClientCommunication.csproj ├── ClientTest │ ├── ClientTest.csproj │ └── Program.cs ├── Proto │ ├── Message.cs │ ├── Message2Clients.cs │ ├── Message2Server.cs │ ├── MessageType.cs │ └── Proto.csproj ├── README.md ├── ServerCommunication │ ├── ServerCommunication.cs │ └── ServerCommunication.csproj ├── ServerTest │ ├── Program.cs │ └── ServerTest.csproj ├── communication.sln ├── runClient.cmd └── runServer.cmd ├── dependency ├── .gitignore ├── Dockerfile │ ├── Dockerfile_compile │ ├── Dockerfile_run │ └── README.md ├── README.md ├── algorithm │ ├── final.cpp │ └── high_ladder.cpp ├── dll │ └── README.md ├── lib │ └── README.md ├── nupkg │ └── README.md ├── proto │ ├── Message2Clients.proto │ ├── Message2Server.proto │ ├── MessageType.proto │ ├── README.md │ ├── generate_cpp.cmd │ ├── generate_cpp.sh │ ├── generate_cs.cmd │ └── generate_cs.sh ├── py │ └── upload.py └── shell │ ├── BuildLogic.ps1 │ ├── README.md │ ├── compile.sh │ └── run.sh ├── experimental ├── CAPI │ ├── README.md │ └── rust │ │ └── README.md ├── README.md └── installer │ ├── README.md │ └── pic │ └── 1.png ├── installer ├── .gitignore ├── Installer │ ├── App.xaml │ ├── App.xaml.cs │ ├── AssemblyInfo.cs │ ├── Installer.csproj │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── eesast_logo.ico │ └── eesast_logo.jpg ├── README.md └── installer.sln ├── interface ├── .gitignore ├── .vsconfig ├── Assets │ ├── Animation │ │ ├── Player1_1.controller │ │ ├── Player_Idle.anim │ │ └── Player_Run.anim │ ├── Audio │ │ ├── CommonBombing.wav │ │ ├── FastBombing.wav │ │ ├── LineBombing.wav │ │ └── StrongBombing.wav │ ├── Prefabs │ │ ├── Battery.prefab │ │ ├── BlindZone.prefab │ │ ├── BombingCommonJammer.prefab │ │ ├── BombingFastJammer.prefab │ │ ├── BombingLineJammer.prefab │ │ ├── BombingStrongJammer.prefab │ │ ├── Booster.prefab │ │ ├── CPU.prefab │ │ ├── CPUFactory.prefab │ │ ├── CommonJammer.prefab │ │ ├── FastJammer.prefab │ │ ├── LineJammer.prefab │ │ ├── PlayerGreenTeam.prefab │ │ ├── PlayerRedTeam.prefab │ │ ├── PowerBank.prefab │ │ ├── Shield.prefab │ │ ├── StrongJammer.prefab │ │ ├── Sword.prefab │ │ ├── TrailHigh.prefab │ │ ├── TrailLow.prefab │ │ ├── TrailMidium.prefab │ │ ├── Vampire.prefab │ │ └── Wall.prefab │ ├── Renderer │ │ ├── New 2D Renderer Data.asset │ │ ├── UniversalRenderPipelineAsset.asset │ │ └── UniversalRenderPipelineAsset_Renderer.asset │ ├── Scenes │ │ ├── BeginScene.unity │ │ ├── EndScene.unity │ │ └── MainScene.unity │ ├── Scripts │ │ ├── PlayerController.cs │ │ ├── PlayerControllerTest.cs │ │ └── SceneTransfer.cs │ ├── Sprites │ │ ├── Background.png │ │ ├── Battery.png │ │ ├── Booster.png │ │ ├── CPU.png │ │ ├── CPUFactory.png │ │ ├── CommonJammer.png │ │ ├── Electricity.png │ │ ├── EndGameUI.png │ │ ├── EnergyBall.png │ │ ├── FastJammer.png │ │ ├── Flare.png │ │ ├── LineJammer.png │ │ ├── PlayerTeam1.png │ │ ├── PlayerTeam2.png │ │ ├── Shader.png │ │ ├── Shield.png │ │ ├── StartGameUI.png │ │ ├── StrongJammer.png │ │ ├── Sword.png │ │ └── Wall.png │ ├── TextMesh Pro │ │ ├── Documentation │ │ │ └── TextMesh Pro User Guide 2016.pdf │ │ ├── Examples & Extras │ │ │ ├── Fonts │ │ │ │ ├── Anton OFL.txt │ │ │ │ ├── Anton.ttf │ │ │ │ ├── Bangers - OFL.txt │ │ │ │ ├── Bangers.ttf │ │ │ │ ├── Electronic Highway Sign.TTF │ │ │ │ ├── Oswald-Bold - OFL.txt │ │ │ │ ├── Oswald-Bold.ttf │ │ │ │ └── Roboto-Bold.ttf │ │ │ ├── Materials │ │ │ │ ├── Crate - Surface Shader Scene.mat │ │ │ │ ├── Ground - Logo Scene.mat │ │ │ │ ├── Ground - Surface Shader Scene.mat │ │ │ │ └── Small Crate_diffuse.mat │ │ │ ├── Prefabs │ │ │ │ ├── Text Popup.prefab │ │ │ │ ├── TextMeshPro - Prefab 1.prefab │ │ │ │ └── TextMeshPro - Prefab 2.prefab │ │ │ ├── Resources │ │ │ │ ├── Color Gradient Presets │ │ │ │ │ ├── Blue to Purple - Vertical.asset │ │ │ │ │ ├── Dark to Light Green - Vertical.asset │ │ │ │ │ ├── Light to Dark Green - Vertical.asset │ │ │ │ │ └── Yellow to Orange - Vertical.asset │ │ │ │ ├── Fonts & Materials │ │ │ │ │ ├── Anton SDF - Drop Shadow.mat │ │ │ │ │ ├── Anton SDF - Outline.mat │ │ │ │ │ ├── Anton SDF - Sunny Days.mat │ │ │ │ │ ├── Anton SDF.asset │ │ │ │ │ ├── Bangers SDF - Drop Shadow.mat │ │ │ │ │ ├── Bangers SDF - Outline.mat │ │ │ │ │ ├── Bangers SDF Glow.mat │ │ │ │ │ ├── Bangers SDF Logo.mat │ │ │ │ │ ├── Bangers SDF.asset │ │ │ │ │ ├── Electronic Highway Sign SDF.asset │ │ │ │ │ ├── LiberationSans SDF - Metalic Green.mat │ │ │ │ │ ├── LiberationSans SDF - Overlay.mat │ │ │ │ │ ├── LiberationSans SDF - Soft Mask.mat │ │ │ │ │ ├── Oswald Bold SDF.asset │ │ │ │ │ ├── Roboto-Bold SDF - Drop Shadow.mat │ │ │ │ │ ├── Roboto-Bold SDF - Surface.mat │ │ │ │ │ └── Roboto-Bold SDF.asset │ │ │ │ └── Sprite Assets │ │ │ │ │ ├── Default Sprite Asset.asset │ │ │ │ │ └── DropCap Numbers.asset │ │ │ ├── Scenes │ │ │ │ ├── 01- Single Line TextMesh Pro.unity │ │ │ │ ├── 02 - Multi-line TextMesh Pro.unity │ │ │ │ ├── 03 - Line Justification.unity │ │ │ │ ├── 04 - Word Wrapping.unity │ │ │ │ ├── 05 - Style Tags.unity │ │ │ │ ├── 06 - Extra Rich Text Examples.unity │ │ │ │ ├── 07 - Superscript & Subscript Example.unity │ │ │ │ ├── 08 - Improved Text Alignment.unity │ │ │ │ ├── 09 - Margin Tag Example.unity │ │ │ │ ├── 10 - Bullets & Numbered List Example.unity │ │ │ │ ├── 11 - The Style Tag.unity │ │ │ │ ├── 12 - Link Example.unity │ │ │ │ ├── 12a - Text Interactions.unity │ │ │ │ ├── 13 - Soft Hyphenation.unity │ │ │ │ ├── 14 - Multi Font & Sprites.unity │ │ │ │ ├── 15 - Inline Graphics & Sprites.unity │ │ │ │ ├── 16 - Linked text overflow mode example.unity │ │ │ │ ├── 17 - Old Computer Terminal.unity │ │ │ │ ├── 18 - ScrollRect & Masking & Layout.unity │ │ │ │ ├── 19 - Masking Texture & Soft Mask.unity │ │ │ │ ├── 20 - Input Field with Scrollbar.unity │ │ │ │ ├── 21 - Script Example.unity │ │ │ │ ├── 22 - Basic Scripting Example.unity │ │ │ │ ├── 23 - Animating Vertex Attributes.unity │ │ │ │ ├── 24 - Surface Shader Example.unity │ │ │ │ ├── 25 - Sunny Days Example.unity │ │ │ │ ├── 26 - Dropdown Placeholder Example.unity │ │ │ │ └── Benchmark (Floating Text).unity │ │ │ ├── Scripts │ │ │ │ ├── Benchmark01.cs │ │ │ │ ├── Benchmark01_UGUI.cs │ │ │ │ ├── Benchmark02.cs │ │ │ │ ├── Benchmark03.cs │ │ │ │ ├── Benchmark04.cs │ │ │ │ ├── CameraController.cs │ │ │ │ ├── ChatController.cs │ │ │ │ ├── DropdownSample.cs │ │ │ │ ├── EnvMapAnimator.cs │ │ │ │ ├── ObjectSpin.cs │ │ │ │ ├── ShaderPropAnimator.cs │ │ │ │ ├── SimpleScript.cs │ │ │ │ ├── SkewTextExample.cs │ │ │ │ ├── TMP_DigitValidator.cs │ │ │ │ ├── TMP_ExampleScript_01.cs │ │ │ │ ├── TMP_FrameRateCounter.cs │ │ │ │ ├── TMP_PhoneNumberValidator.cs │ │ │ │ ├── TMP_TextEventCheck.cs │ │ │ │ ├── TMP_TextEventHandler.cs │ │ │ │ ├── TMP_TextInfoDebugTool.cs │ │ │ │ ├── TMP_TextSelector_A.cs │ │ │ │ ├── TMP_TextSelector_B.cs │ │ │ │ ├── TMP_UiFrameRateCounter.cs │ │ │ │ ├── TMPro_InstructionOverlay.cs │ │ │ │ ├── TeleType.cs │ │ │ │ ├── TextConsoleSimulator.cs │ │ │ │ ├── TextMeshProFloatingText.cs │ │ │ │ ├── TextMeshSpawner.cs │ │ │ │ ├── VertexColorCycler.cs │ │ │ │ ├── VertexJitter.cs │ │ │ │ ├── VertexShakeA.cs │ │ │ │ ├── VertexShakeB.cs │ │ │ │ ├── VertexZoom.cs │ │ │ │ └── WarpTextExample.cs │ │ │ ├── Sprites │ │ │ │ ├── Default Sprites.png │ │ │ │ └── DropCap Numbers.psd │ │ │ └── Textures │ │ │ │ ├── Brushed Metal 3.jpg │ │ │ │ ├── Floor Cement.jpg │ │ │ │ ├── Floor Tiles 1 - diffuse.jpg │ │ │ │ ├── Fruit Jelly (B&W).jpg │ │ │ │ ├── Gradient Diagonal (Color).jpg │ │ │ │ ├── Gradient Horizontal (Color).jpg │ │ │ │ ├── Gradient Vertical (Color).jpg │ │ │ │ ├── Mask Zig-n-Zag.psd │ │ │ │ ├── Small Crate_diffuse.jpg │ │ │ │ ├── Small Crate_normal.jpg │ │ │ │ ├── Sunny Days - Seamless.jpg │ │ │ │ ├── Text Overflow - Linked Text Image 1.png │ │ │ │ ├── Text Overflow - Linked Text UI Screenshot.png │ │ │ │ ├── Wipe Pattern - Circle.psd │ │ │ │ ├── Wipe Pattern - Diagonal.psd │ │ │ │ ├── Wipe Pattern - Radial Double.psd │ │ │ │ └── Wipe Pattern - Radial Quad.psd │ │ ├── Fonts │ │ │ ├── LiberationSans - OFL.txt │ │ │ └── LiberationSans.ttf │ │ ├── Resources │ │ │ ├── Fonts & Materials │ │ │ │ ├── LiberationSans SDF - Drop Shadow.mat │ │ │ │ ├── LiberationSans SDF - Fallback.asset │ │ │ │ ├── LiberationSans SDF - Outline.mat │ │ │ │ └── LiberationSans SDF.asset │ │ │ ├── LineBreaking Following Characters.txt │ │ │ ├── LineBreaking Leading Characters.txt │ │ │ ├── Sprite Assets │ │ │ │ └── EmojiOne.asset │ │ │ ├── Style Sheets │ │ │ │ └── Default Style Sheet.asset │ │ │ └── TMP Settings.asset │ │ ├── Shaders │ │ │ ├── TMP_Bitmap-Custom-Atlas.shader │ │ │ ├── TMP_Bitmap-Mobile.shader │ │ │ ├── TMP_Bitmap.shader │ │ │ ├── TMP_SDF Overlay.shader │ │ │ ├── TMP_SDF SSD.shader │ │ │ ├── TMP_SDF-Mobile Masking.shader │ │ │ ├── TMP_SDF-Mobile Overlay.shader │ │ │ ├── TMP_SDF-Mobile SSD.shader │ │ │ ├── TMP_SDF-Mobile.shader │ │ │ ├── TMP_SDF-Surface-Mobile.shader │ │ │ ├── TMP_SDF-Surface.shader │ │ │ ├── TMP_SDF.shader │ │ │ ├── TMP_Sprite.shader │ │ │ ├── TMPro.cginc │ │ │ ├── TMPro_Mobile.cginc │ │ │ ├── TMPro_Properties.cginc │ │ │ └── TMPro_Surface.cginc │ │ └── Sprites │ │ │ ├── EmojiOne Attribution.txt │ │ │ ├── EmojiOne.json │ │ │ └── EmojiOne.png │ └── Texture │ │ └── Shader.mat ├── ProjectSettings │ ├── AudioManager.asset │ ├── AutoStreamingSettings.asset │ ├── ClusterInputManager.asset │ ├── DynamicsManager.asset │ ├── EditorBuildSettings.asset │ ├── EditorSettings.asset │ ├── GraphicsSettings.asset │ ├── InputManager.asset │ ├── NavMeshAreas.asset │ ├── NetworkManager.asset │ ├── PackageManagerSettings.asset │ ├── Physics2DSettings.asset │ ├── PresetManager.asset │ ├── ProjectSettings.asset │ ├── ProjectVersion.txt │ ├── QualitySettings.asset │ ├── TagManager.asset │ ├── TimeManager.asset │ ├── URPProjectSettings.asset │ ├── UnityConnectSettings.asset │ ├── VFXManager.asset │ ├── VersionControlSettings.asset │ └── XRSettings.asset └── README.md ├── launcher ├── .gitignore ├── README.md ├── launcher.sln └── launcher │ ├── App.xaml │ ├── App.xaml.cs │ ├── AssemblyInfo.cs │ ├── Launcher.csproj │ ├── MainWindow.xaml │ └── MainWindow.xaml.cs ├── logic ├── .editorconfig ├── .gitignore ├── CSharpInterface │ ├── CSharpInterface.csproj │ ├── ClientInterface.cs │ ├── Competitor.cs │ ├── Constants.cs │ ├── Obj.cs │ ├── Program.cs │ └── Properties │ │ └── launchSettings.json ├── Client │ ├── App.xaml │ ├── App.xaml.cs │ ├── AssemblyInfo.cs │ ├── Client.csproj │ ├── CommandLineArgs.cs │ ├── ConnectRegister.xaml │ ├── ConnectRegister.xaml.cs │ ├── EESAST.ico │ ├── ErrorDisplayer.xaml │ ├── ErrorDisplayer.xaml.cs │ ├── Logo.png │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── PlaybackClient.cs │ ├── Player.png │ ├── Properties │ │ └── launchSettings.json │ ├── StatusBar.xaml │ ├── StatusBar.xaml.cs │ ├── Team.png │ ├── Themes │ │ └── Generic.xaml │ └── Warning.png ├── GameClass │ ├── GameClass.csproj │ ├── GameObj │ │ ├── BombedBullet.cs │ │ ├── Bullet.cs │ │ ├── Character.BuffManager.cs │ │ ├── Character.SkillManager.cs │ │ ├── Character.cs │ │ ├── GameObj.cs │ │ ├── Gem.cs │ │ ├── Map │ │ │ ├── BirthPoint.cs │ │ │ ├── GemWell.cs │ │ │ ├── Grass.cs │ │ │ ├── Map.cs │ │ │ ├── MapGameTimer.cs │ │ │ ├── MapInfo.cs │ │ │ └── Wall.cs │ │ ├── ObjOfCharacter.cs │ │ ├── OutOfBoundBlock.cs │ │ ├── PickedProp.cs │ │ ├── Prop.cs │ │ └── Team.cs │ └── Skill │ │ ├── CommonSkill.cs │ │ ├── ISkill.cs │ │ └── PassiveSkill.cs ├── GameEngine │ ├── CollisionChecker.cs │ ├── GameEngine.csproj │ └── MoveEngine.cs ├── GameRules.md ├── Gaming │ ├── AttackManager.cs │ ├── Game.cs │ ├── Gaming.csproj │ ├── GemManager.cs │ ├── MoveManager.cs │ ├── PropManager.cs │ └── SkillManager.cs ├── MapGenerator │ ├── MapGenerator.csproj │ ├── MapGenerator.sln │ ├── Program.cs │ └── README.md ├── Message.md ├── Preparation │ ├── Deprecated │ │ └── MoveableObj.cs │ ├── GameData │ │ └── GameData.cs │ ├── Interface │ │ ├── ICharacter.cs │ │ ├── IGameObj.cs │ │ ├── IMap.cs │ │ ├── IMoveable.cs │ │ ├── IObjOfCharacter.cs │ │ ├── IOutOfBound.cs │ │ └── ITimer.cs │ ├── Preparation.csproj │ └── Utility │ │ ├── Debugger.cs │ │ ├── EnumType.cs │ │ ├── MapEncoder.cs │ │ ├── Tools.cs │ │ ├── Vector.cs │ │ └── XYPosition.cs ├── README.md ├── Server │ ├── ArgumentOption.cs │ ├── CopyInfo.cs │ ├── GameServer.cs │ ├── HttpSender.cs │ ├── PlaybackServer.cs │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── Server.csproj │ └── ServerBase.cs ├── Test │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ └── Test.csproj ├── bash │ ├── csharpclient.sh │ ├── gameServer_1.sh │ ├── gameServer_2.sh │ ├── gameServer_8.sh │ └── testClient.sh ├── cmd │ ├── CSharpClient.cmd │ ├── ConnectInfo.txt │ ├── gameServer.cmd │ ├── gameServerforUnityonePerson.cmd │ ├── img │ │ └── wpf.png │ ├── maps │ │ ├── map1.txt │ │ ├── mapforfun.txt │ │ ├── newmap.txt │ │ └── testmap.txt │ ├── playback.cmd │ ├── playbackServer.cmd │ ├── testClient.cmd │ └── 使用文档.md ├── img │ └── structrue.jpg └── logic.sln ├── playback ├── .gitignore ├── PlayBack │ ├── MessageReader.cs │ ├── MessageWriter.cs │ ├── PlayBack.csproj │ └── PlaybackConstant.cs ├── PlaybackForUnity │ ├── MessageReaderForUnity.cs │ ├── PlaybackConstantForUnity.cs │ └── PlaybackForUnity.csproj ├── README.md └── playback.sln ├── players ├── .gitattributes ├── Angry Berries │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── NixieTube队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── README.md ├── cxz的大爷们的队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 人工智障制造小组 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 坐飞机到你的出生地,疯狂地偷吃你的CPU │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 孤客若风 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 寄寄摆摆 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 报名简介(测试队伍) │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 无名Team │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 来点内鬼 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 特征队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 称名伍队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 老六给他整个活!走!忽略!     │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 蒙的全队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 褪色者队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 西红柿突变暴龙战士 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 防沉迷队 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── 龙卷风摧毁停车场 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp └── 龙门茶馆 │ ├── player1.cpp │ ├── player2.cpp │ ├── player3.cpp │ └── player4.cpp ├── renovate.json └── resource ├── APIsettings.png ├── APIsettings2.png ├── README.md ├── debug.png ├── eesast_logo_32x32.png ├── main_interface.jpg ├── no-debug.png ├── old_main_interface.jpg ├── structure.png ├── structure.vsdx ├── tool_1.png ├── tool_2.png ├── tool_3.png └── tool_4.png /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # behavior for image files 8 | # image files are treated as binary by default. 9 | ############################################################################### 10 | *.jpg binary 11 | *.png binary 12 | *.gif binary 13 | *.bmp binary 14 | *.ico binary 15 | *.jpeg binary 16 | *.jfif binary 17 | 18 | ############################################################################### 19 | # diff behavior for common document formats 20 | # Convert binary document formats to text before diffing them. 21 | ############################################################################### 22 | *.doc diff=astextplain 23 | *.DOC diff=astextplain 24 | *.docx diff=astextplain 25 | *.DOCX diff=astextplain 26 | *.dot diff=astextplain 27 | *.DOT diff=astextplain 28 | *.pdf diff=astextplain 29 | *.PDF diff=astextplain 30 | *.rtf diff=astextplain 31 | *.RTF diff=astextplain 32 | 33 | ############################################################################### 34 | # Force Windows cmd and batch scripts to always use crlf line endings so that if 35 | # a repo is accessed in Windows via a file share from Unix, the scripts will 36 | # work. 37 | ############################################################################### 38 | *.cmd text eol=crlf 39 | *.bat text eol=crlf 40 | 41 | ############################################################################### 42 | # Force bash scripts to always use lf line endings so that if a repo is accessed 43 | # in Unix via a file share from Windows, the scripts will work. 44 | ############################################################################### 45 | *.sh text eol=lf 46 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [Timothy-LiuXuefeng] 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | - [ ] 您的代码是否能够编译通过? 6 | - [ ] 您是否检查了目前在 [pull requests](https://github.com/eesast/THUAI5/pulls) 中是否有与你的贡献功能相同的更改? 7 | - [ ] 您的贡献是否符合[贡献者代码协议](https://github.com/eesast/THUAI5/blob/dev/CODE_OF_CONDUCT.md)? 8 | - [ ] 您的贡献是否符合[开发规则](https://github.com/eesast/THUAI5#%E5%BC%80%E5%8F%91%E8%A7%84%E5%88%99)? 9 | 10 | Discriptions of this pull request: 11 | 12 | 13 | 14 | 15 | No additional discription. 16 | -------------------------------------------------------------------------------- /.github/workflows/README.md: -------------------------------------------------------------------------------- 1 | # .github 2 | 3 | ## 简介 4 | 5 | 用于存放 CI 文件,将代码编译并打包,上传到服务器上,供选手进行下载。 6 | 7 | ## 注意事项 8 | 9 | 在其他组的第一个 Demo 版本完成之后开始开发,需要与其他组沟通编译环境、目录结构等;在此之前先自己 fork 的仓库内进行测试。 10 | 11 | ## 开发人员 12 | 13 | + ……(自己加) 14 | 15 | -------------------------------------------------------------------------------- /.github/workflows/mirror.yml: -------------------------------------------------------------------------------- 1 | name: mirror 2 | on: 3 | push: 4 | branches: [dev, master] 5 | 6 | jobs: 7 | mirror-to-gitee: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Mirror to Gitee 12 | uses: wearerequired/git-mirror-action@master 13 | env: 14 | SSH_PRIVATE_KEY: ${{ secrets.GITEE_SSH_PRIVATE_KEY }} 15 | with: 16 | source-repo: "git@github.com:eesast/THUAI5.git" 17 | destination-repo: "git@gitee.com:eesast/THUAI5.git" 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Don't lay README in .github folder 2 | .github/README.* 3 | 4 | # .vs, .vscode 5 | .vs/ 6 | .vscode/ 7 | -------------------------------------------------------------------------------- /CAPI/.gitattributes: -------------------------------------------------------------------------------- 1 | protobuf/** linguist-vendored 2 | tclap/** linguist-vendored 3 | HPSocket/** linguist-vendored 4 | 5 | proto/** linguist-generated 6 | 7 | *.h linguist-language=C++ 8 | -------------------------------------------------------------------------------- /CAPI/API/.gitignore: -------------------------------------------------------------------------------- 1 | *.lib 2 | *.dll 3 | *.so 4 | *.a -------------------------------------------------------------------------------- /CAPI/API/include/AI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef AI_H 3 | #define AI_H 4 | 5 | #include 6 | #include "API.h" 7 | 8 | /// 9 | /// AI通用接口 10 | /// 11 | class IAI 12 | { 13 | public: 14 | virtual void play(IAPI& api) = 0; 15 | }; 16 | using CreateAIFunc = std::unique_ptr(*)(); 17 | 18 | // 此处应该是一个工厂模式——生产不同种类的AI 19 | 20 | /// 21 | /// 一般AI 22 | /// 23 | class AI :public IAI 24 | { 25 | public: 26 | AI() :IAI() {} 27 | void play(IAPI& api) override; 28 | }; 29 | 30 | /// 命令行程序主函数 31 | int thuai5_main(int argc, char** argv, CreateAIFunc AIBuilder); 32 | 33 | 34 | #endif // !AI_H -------------------------------------------------------------------------------- /CAPI/API/include/state.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef STATE_H 3 | #define STATE_H 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include "structures.h" 10 | 11 | /// 12 | /// 存储玩家状态 13 | /// 14 | struct State 15 | { 16 | // 队伍分数信息 17 | uint32_t teamScore; 18 | 19 | // 自身信息 20 | std::shared_ptr self; 21 | 22 | // 全局游戏信息 23 | std::vector> robots; 24 | std::vector> props; 25 | std::vector> jammers; 26 | THUAI5::PlaceType gamemap[51][51]; 27 | 28 | // GUID信息 29 | std::vector guids; 30 | 31 | }; 32 | 33 | #endif // !STATE_H 34 | 35 | -------------------------------------------------------------------------------- /CAPI/API/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /CAPI/API/src/AI.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../include/AI.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | using namespace std::literals::chrono_literals; 9 | 10 | /* 请于 VS2019 项目属性中开启 C++17 标准:/std:c++17 */ 11 | 12 | // 为假则play()调用期间游戏状态更新阻塞,为真则只保证当前游戏状态不会被状态更新函数与IAPI的方法同时访问 13 | extern const bool asynchronous = false; 14 | 15 | //MASTER 16 | // 选手主动技能,选手 !!必须!! 定义此变量来选择主动技能 17 | extern const THUAI5::SoftwareType playerSoftware = THUAI5::SoftwareType::PowerEmission; 18 | 19 | // 选手被动技能,选手 !!必须!! 定义此变量来选择被动技能 20 | extern const THUAI5::HardwareType playerHardware = THUAI5::HardwareType::PowerBank; 21 | 22 | namespace 23 | { 24 | [[maybe_unused]] std::uniform_real_distribution direction(0, 2 * 3.1415926); 25 | [[maybe_unused]] std::default_random_engine e{ std::random_device{}() }; 26 | } 27 | 28 | THUAI5::PlaceType map[50][50] = {}; 29 | 30 | void AI::play(IAPI& api) 31 | { 32 | std::ios::sync_with_stdio(false); 33 | auto self = api.GetSelfInfo(); 34 | } 35 | 36 | 37 | -------------------------------------------------------------------------------- /CAPI/Client.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k .\x64\Debug\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w 4 | 5 | start cmd /k .\x64\Debug\API.exe -t 0 -p 1 -P 7777 -I 127.0.0.1 -d -w 6 | 7 | start cmd /k .\x64\Debug\API.exe -t 0 -p 2 -P 7777 -I 127.0.0.1 -d -w 8 | 9 | start cmd /k .\x64\Debug\API.exe -t 0 -p 3 -P 7777 -I 127.0.0.1 -d -w 10 | 11 | start cmd /k .\x64\Debug\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w 12 | 13 | start cmd /k .\x64\Debug\API.exe -t 1 -p 1 -P 7777 -I 127.0.0.1 -d -w 14 | 15 | start cmd /k .\x64\Debug\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w 16 | 17 | start cmd /k .\x64\Debug\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w 18 | -------------------------------------------------------------------------------- /CAPI/Communication/.gitignore: -------------------------------------------------------------------------------- 1 | *.lib 2 | *.dll 3 | *.so 4 | *.a -------------------------------------------------------------------------------- /CAPI/Communication/Communication.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 头文件 20 | 21 | 22 | 23 | 24 | 源文件 25 | 26 | 27 | 源文件 28 | 29 | 30 | 源文件 31 | 32 | 33 | 源文件 34 | 35 | 36 | -------------------------------------------------------------------------------- /CAPI/README.md: -------------------------------------------------------------------------------- 1 | # CAPI 2 | 3 | ## 简介 4 | 5 | C++ 通信组件以及选手接口 6 | 7 | ## 目标 8 | 9 | ### 基本目标 10 | 11 | + 基于 Protobuf 和 HpSocket,为客户端提供 C++ 通信组件 12 | + 为选手提供游戏接口 13 | 14 | ### 重要目标 15 | 16 | + 确定好通信的方式,保证通信的高效 17 | + 修正 THUAI4 信息重复发送的问题 18 | + 将通信逻辑与游戏逻辑彻底分开,以供日后复用 19 | + 支持多终端游戏、观战等,尽量不对客户端人数、观战人数等做出任何假定,游戏人数完全由服务器决定 20 | + 去除往年遗留下来的以 Agent 作为通信中介的方式,改为客户端直连服务器 21 | + 改进选手接口,思考如何强制禁止选手一直占用 CPU 而导致 CPU 占用过大的问题。可选的改进方案:将选手操作改为以返回值的形式返回,等等 22 | 23 | ### 提高目标(饼) 24 | 25 | + 提供其他语言(如 Python、C#、Java 等)的选手接口 26 | + ……(未完待画) 27 | 28 | ## 统一约定 29 | 30 | + 语言:C++(主要)、C(次要) 31 | + 代码应当能够同时运行在 Windows 10 平台和 Linux 平台上。Windows 平台下采用 MSVC 作为编译工具,Linux 平台采用 GCC 作为编译工具 32 | + Windows 下的开发工具使用 Visual Studio 2019 或 Visual Studio 2022,语言标准采用 C++17 和 C17 (MSVC 编译选项 `/std:c++17; /std:c17`),并且应同时在 x64 平台的 Debug 与 Release 模式下正确编译并运行 33 | + Linux 下 C 语言编译工具使用 gcc,语言标准为 `-std=c17`;C++ 编译工具使用 g++,语言标准为 `-std=c++17`。优化选项为 `-O2`,生成 64 位程序 `-m64`,并编写相应的 Makefile 34 | 35 | ## 注意事项 36 | 37 | + 与其他组共同商定通信协议 38 | + Visual Studio 新建的 C++ 代码文件默认字符编码是 GB2312、默认缩进方式是 TAB,应该注意手动改成 UTF-8 和 空格缩进 39 | + 了解 Visual Studio 的项目属性配置,例如第三方库的链接、预定义宏等 40 | + 使用现代 C++ 进行编程,尽量避免裸指针,多使用引用和智能指针 41 | + 了解 C、C++ 预处理、编译、链接的基本概念 42 | + 注意模块化、单元化,降低各个类、各个模块之间的耦合。特别注意避免相互依赖、环形依赖的问题 43 | + 遵循头文件(`.h`、`.hpp`)的编写规范 44 | + 杜绝头文件相互包含与环形包含 45 | + 头文件中最好同时写 `#pragma once` 以及保护宏,而 `cpp` 中不要写这两个东西 46 | + 头文件中禁止 `using namespace std`!!!也不允许在任何自定义的名字空间中 `using namespace std`!!! 47 | + 头文件和 `cpp` 文件各司其职,代码写在改写的位置 48 | + 禁止 include .cpp 或 .c 文件 49 | + 避免忙等待,注意线程安全,做好线程同步 50 | 51 | ## 开发人员 52 | 53 | + ……(自己加) 54 | 55 | -------------------------------------------------------------------------------- /CAPI/bash/.gitignore: -------------------------------------------------------------------------------- 1 | *.log -------------------------------------------------------------------------------- /CAPI/bash/Client_1.sh: -------------------------------------------------------------------------------- 1 | ../capi -t 0 -p 0 -P 7777 -I 127.0.0.1 -w 2 | -------------------------------------------------------------------------------- /CAPI/bash/Client_2.sh: -------------------------------------------------------------------------------- 1 | ../capi -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w & 2 | ../capi -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w & 3 | wait 4 | exit 5 | -------------------------------------------------------------------------------- /CAPI/bash/Client_8.sh: -------------------------------------------------------------------------------- 1 | ../capi -t 0 -p 0 -P 7777 -I 127.0.0.1 -d & 2 | ../capi -t 1 -p 0 -P 7777 -I 127.0.0.1 -d & 3 | ../capi -t 0 -p 1 -P 7777 -I 127.0.0.1 -d & 4 | ../capi -t 1 -p 1 -P 7777 -I 127.0.0.1 -d & 5 | ../capi -t 0 -p 2 -P 7777 -I 127.0.0.1 -d & 6 | ../capi -t 1 -p 2 -P 7777 -I 127.0.0.1 -d & 7 | ../capi -t 0 -p 3 -P 7777 -I 127.0.0.1 -d & 8 | ../capi -t 1 -p 3 -P 7777 -I 127.0.0.1 -d & 9 | wait 10 | exit 11 | -------------------------------------------------------------------------------- /CAPI/cmd/Client_1.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Release\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w 4 | 5 | pause -------------------------------------------------------------------------------- /CAPI/cmd/Client_1_debug.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w 4 | 5 | pause -------------------------------------------------------------------------------- /CAPI/cmd/Client_2.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Release\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w 4 | 5 | start cmd /k ..\x64\Release\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w 6 | -------------------------------------------------------------------------------- /CAPI/cmd/Client_2_debug.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -d -w 4 | 5 | start cmd /k ..\x64\Debug\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -d -w 6 | -------------------------------------------------------------------------------- /CAPI/cmd/Client_8.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Release\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -w 4 | 5 | start cmd /k ..\x64\Release\API.exe -t 0 -p 1 -P 7777 -I 127.0.0.1 -w 6 | 7 | start cmd /k ..\x64\Release\API.exe -t 0 -p 2 -P 7777 -I 127.0.0.1 -w 8 | 9 | start cmd /k ..\x64\Release\API.exe -t 0 -p 3 -P 7777 -I 127.0.0.1 -w 10 | 11 | start cmd /k ..\x64\Release\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -w 12 | 13 | start cmd /k ..\x64\Release\API.exe -t 1 -p 1 -P 7777 -I 127.0.0.1 -w 14 | 15 | start cmd /k ..\x64\Release\API.exe -t 1 -p 2 -P 7777 -I 127.0.0.1 -w 16 | 17 | start cmd /k ..\x64\Release\API.exe -t 1 -p 3 -P 7777 -I 127.0.0.1 -w 18 | 19 | -------------------------------------------------------------------------------- /CAPI/cmd/Client_8_debug.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 0 -P 7777 -I 127.0.0.1 -w 4 | 5 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 1 -P 7777 -I 127.0.0.1 -w 6 | 7 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 2 -P 7777 -I 127.0.0.1 -w 8 | 9 | start cmd /k ..\x64\Debug\API.exe -t 0 -p 3 -P 7777 -I 127.0.0.1 -w 10 | 11 | start cmd /k ..\x64\Debug\API.exe -t 1 -p 0 -P 7777 -I 127.0.0.1 -w 12 | 13 | start cmd /k ..\x64\Debug\API.exe -t 1 -p 1 -P 7777 -I 127.0.0.1 -w 14 | 15 | start cmd /k ..\x64\Debug\API.exe -t 1 -p 2 -P 7777 -I 127.0.0.1 -w 16 | 17 | start cmd /k ..\x64\Debug\API.exe -t 1 -p 3 -P 7777 -I 127.0.0.1 -w 18 | 19 | -------------------------------------------------------------------------------- /CAPI/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008 Google Inc. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the name of Google Inc. nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | Code generated by the Protocol Buffer compiler is owned by the owner 30 | of the input file used when generating it. This code is not 31 | standalone and requires a support library to be linked with it. This 32 | support library is itself covered by the above license. 33 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/any_test.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package protobuf_unittest; 34 | 35 | import "google/protobuf/any.proto"; 36 | 37 | option java_outer_classname = "TestAnyProto"; 38 | 39 | message TestAny { 40 | int32 int32_value = 1; 41 | google.protobuf.Any any_value = 2; 42 | repeated google.protobuf.Any repeated_any_value = 3; 43 | string text = 4; 44 | } 45 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 32 | #define GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 33 | 34 | #include 35 | 36 | struct FileToc { 37 | const char* name; 38 | const char* data; 39 | }; 40 | 41 | extern struct FileToc well_known_types_js[]; 42 | 43 | #endif // GOOGLE_PROTOBUF_COMPILER_JS_WELL_KNOWN_TYPES_EMBED_H__ 44 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package A.B.C; 4 | 5 | import "ruby_generated_code_proto2_import.proto"; 6 | 7 | message TestMessage { 8 | int32 optional_int32 = 1; 9 | int64 optional_int64 = 2; 10 | uint32 optional_uint32 = 3; 11 | uint64 optional_uint64 = 4; 12 | bool optional_bool = 5; 13 | double optional_double = 6; 14 | float optional_float = 7; 15 | string optional_string = 8; 16 | bytes optional_bytes = 9; 17 | TestEnum optional_enum = 10; 18 | TestMessage optional_msg = 11; 19 | TestImportedMessage optional_proto2_submessage = 12; 20 | 21 | repeated int32 repeated_int32 = 21; 22 | repeated int64 repeated_int64 = 22; 23 | repeated uint32 repeated_uint32 = 23; 24 | repeated uint64 repeated_uint64 = 24; 25 | repeated bool repeated_bool = 25; 26 | repeated double repeated_double = 26; 27 | repeated float repeated_float = 27; 28 | repeated string repeated_string = 28; 29 | repeated bytes repeated_bytes = 29; 30 | repeated TestEnum repeated_enum = 30; 31 | repeated TestMessage repeated_msg = 31; 32 | 33 | oneof my_oneof { 34 | int32 oneof_int32 = 41; 35 | int64 oneof_int64 = 42; 36 | uint32 oneof_uint32 = 43; 37 | uint64 oneof_uint64 = 44; 38 | bool oneof_bool = 45; 39 | double oneof_double = 46; 40 | float oneof_float = 47; 41 | string oneof_string = 48; 42 | bytes oneof_bytes = 49; 43 | TestEnum oneof_enum = 50; 44 | TestMessage oneof_msg = 51; 45 | } 46 | 47 | map map_int32_string = 61; 48 | map map_int64_string = 62; 49 | map map_uint32_string = 63; 50 | map map_uint64_string = 64; 51 | map map_bool_string = 65; 52 | map map_string_string = 66; 53 | map map_string_msg = 67; 54 | map map_string_enum = 68; 55 | map map_string_int32 = 69; 56 | map map_string_bool = 70; 57 | 58 | message NestedMessage { 59 | int32 foo = 1; 60 | } 61 | 62 | NestedMessage nested_message = 80; 63 | } 64 | 65 | enum TestEnum { 66 | Default = 0; 67 | A = 1; 68 | B = 2; 69 | C = 3; 70 | } 71 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_code_proto2_import.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | package A.B.C; 4 | 5 | message TestImportedMessage {} 6 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three; 4 | 5 | option ruby_package = "A::B::C"; 6 | 7 | message Four { 8 | string a_string = 1; 9 | } 10 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three.and; 4 | 5 | option ruby_package = "AA.BB.CC"; 6 | 7 | message Four { 8 | string another_string = 1; 9 | } 10 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_legacy_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_explicit_legacy.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_explicit_legacy.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.and.Four" do 9 | optional :another_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module AA 15 | module BB 16 | module CC 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.and.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_explicit_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_explicit.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_explicit.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.Four" do 9 | optional :a_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module A 15 | module B 16 | module C 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package one.two.a_three; 4 | 5 | message Four { 6 | string a_string = 1; 7 | } 8 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/compiler/ruby/ruby_generated_pkg_implicit_pb.rb: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: ruby_generated_pkg_implicit.proto 3 | 4 | require 'google/protobuf' 5 | 6 | Google::Protobuf::DescriptorPool.generated_pool.build do 7 | add_file("ruby_generated_pkg_implicit.proto", :syntax => :proto3) do 8 | add_message "one.two.a_three.Four" do 9 | optional :a_string, :string, 1 10 | end 11 | end 12 | end 13 | 14 | module One 15 | module Two 16 | module AThree 17 | Four = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("one.two.a_three.Four").msgclass 18 | end 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/map.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | namespace google { 34 | namespace protobuf { 35 | namespace internal { 36 | 37 | void* const kGlobalEmptyTable[kGlobalEmptyTableSize] = {nullptr}; 38 | 39 | } // namespace internal 40 | } // namespace protobuf 41 | } // namespace google 42 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/metadata.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_METADATA_H__ 32 | #define GOOGLE_PROTOBUF_METADATA_H__ 33 | 34 | // TODO(b/151117630): Remove this file and all instances where it gets imported. 35 | 36 | #endif // GOOGLE_PROTOBUF_METADATA_H__ 37 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/port.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // A common header that is included across all protobuf headers. We do our best 32 | // to avoid #defining any macros here; instead we generally put macros in 33 | // port_def.inc and port_undef.inc so they are not visible from outside of 34 | // protobuf. 35 | 36 | #ifndef GOOGLE_PROTOBUF_PORT_H__ 37 | #define GOOGLE_PROTOBUF_PORT_H__ 38 | 39 | 40 | #endif // GOOGLE_PROTOBUF_PORT_H__ 41 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/proto3_lite_unittest.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | #define LITE_TEST_NAME Proto3LiteTest 34 | #define UNITTEST ::proto3_unittest 35 | 36 | // Must include after the above macros. 37 | #include 38 | 39 | // Make extract script happy. 40 | namespace google { 41 | namespace protobuf { 42 | } // namespace protobuf 43 | } // namespace google 44 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/service.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | 35 | #include 36 | 37 | namespace google { 38 | namespace protobuf { 39 | 40 | Service::~Service() {} 41 | RpcChannel::~RpcChannel() {} 42 | RpcController::~RpcController() {} 43 | 44 | } // namespace protobuf 45 | } // namespace google 46 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/string_member_robber.h: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #ifndef GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 32 | #define GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 33 | 34 | #include 35 | #include 36 | 37 | 38 | #endif // GOOGLE_PROTOBUF_STRING_MEMBER_ROBBER_H__ 39 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/bad_utf8_string: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/bad_utf8_string -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/golden_message: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/golden_message -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/golden_message_maps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/golden_message_maps -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/golden_message_oneof_implemented: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/golden_message_oneof_implemented -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/golden_message_proto3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/golden_message_proto3 -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/testdata/golden_packed_fields_message: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/CAPI/protobuf/src/google/protobuf/testdata/golden_packed_fields_message -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/unittest_arena.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto2"; 32 | 33 | package proto2_arena_unittest; 34 | 35 | option cc_enable_arenas = true; 36 | 37 | message NestedMessage { 38 | optional int32 d = 1; 39 | } 40 | 41 | message ArenaMessage { 42 | repeated NestedMessage repeated_nested_message = 1; 43 | } 44 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/unittest_empty.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: kenton@google.com (Kenton Varda) 32 | // Based on original Protocol Buffers design by 33 | // Sanjay Ghemawat, Jeff Dean, and others. 34 | // 35 | // This file intentionally left blank. (At one point this wouldn't compile 36 | // correctly.) 37 | 38 | syntax = "proto2"; 39 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/unittest_import_public.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: liujisi@google.com (Pherl Liu) 32 | 33 | syntax = "proto2"; 34 | 35 | package protobuf_unittest_import; 36 | 37 | option java_package = "com.google.protobuf.test"; 38 | 39 | message PublicImportMessage { 40 | optional int32 e = 1; 41 | } 42 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/unittest_import_public_lite.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | // Author: liujisi@google.com (Pherl Liu) 32 | 33 | syntax = "proto2"; 34 | 35 | package protobuf_unittest_import; 36 | 37 | option optimize_for = LITE_RUNTIME; 38 | 39 | option java_package = "com.google.protobuf"; 40 | 41 | message PublicImportMessageLite { 42 | optional int32 e = 1; 43 | } 44 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/util/internal/error_listener.cc: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | #include 32 | 33 | namespace google { 34 | namespace protobuf { 35 | namespace util { 36 | namespace converter { 37 | 38 | 39 | } // namespace converter 40 | } // namespace util 41 | } // namespace protobuf 42 | } // namespace google 43 | -------------------------------------------------------------------------------- /CAPI/protobuf/src/google/protobuf/util/internal/testdata/proto3.proto: -------------------------------------------------------------------------------- 1 | // Protocol Buffers - Google's data interchange format 2 | // Copyright 2008 Google Inc. All rights reserved. 3 | // https://developers.google.com/protocol-buffers/ 4 | // 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are 7 | // met: 8 | // 9 | // * Redistributions of source code must retain the above copyright 10 | // notice, this list of conditions and the following disclaimer. 11 | // * Redistributions in binary form must reproduce the above 12 | // copyright notice, this list of conditions and the following disclaimer 13 | // in the documentation and/or other materials provided with the 14 | // distribution. 15 | // * Neither the name of Google Inc. nor the names of its 16 | // contributors may be used to endorse or promote products derived from 17 | // this software without specific prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | syntax = "proto3"; 32 | 33 | package proto_util_converter.testing; 34 | 35 | message Proto3Message { 36 | enum NestedEnum { 37 | FOO = 0; 38 | BAR = 1; 39 | BAZ = 2; 40 | } 41 | NestedEnum enum_value = 1; 42 | } 43 | -------------------------------------------------------------------------------- /CAPI/tclap/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003 Michael E. Smoot 2 | Copyright (c) 2004 Daniel Aarno 3 | Copyright (c) 2017 Google Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | /****************************************************************************** 5 | * 6 | * file: IgnoreRestVisitor.h 7 | * 8 | * Copyright (c) 2003, Michael E. Smoot . 9 | * All rights reserved. 10 | * 11 | * See the file COPYING in the top directory of this distribution for 12 | * more information. 13 | * 14 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | * 22 | *****************************************************************************/ 23 | 24 | 25 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 26 | #define TCLAP_IGNORE_REST_VISITOR_H 27 | 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Visitor that tells the CmdLine to begin ignoring arguments after 35 | * this one is parsed. 36 | */ 37 | class IgnoreRestVisitor: public Visitor 38 | { 39 | public: 40 | 41 | /** 42 | * Constructor. 43 | */ 44 | IgnoreRestVisitor() : Visitor() {} 45 | 46 | /** 47 | * Sets Arg::_ignoreRest. 48 | */ 49 | void visit() { Arg::beginIgnoring(); } 50 | }; 51 | 52 | } 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | Arg.h \ 6 | ArgException.h \ 7 | ArgTraits.h \ 8 | CmdLine.h \ 9 | CmdLineInterface.h \ 10 | CmdLineOutput.h \ 11 | Constraint.h \ 12 | DocBookOutput.h \ 13 | HelpVisitor.h \ 14 | IgnoreRestVisitor.h \ 15 | MultiArg.h \ 16 | MultiSwitchArg.h \ 17 | OptionalUnlabeledTracker.h \ 18 | StandardTraits.h \ 19 | StdOutput.h \ 20 | SwitchArg.h \ 21 | UnlabeledMultiArg.h \ 22 | UnlabeledValueArg.h \ 23 | ValueArg.h \ 24 | ValuesConstraint.h \ 25 | VersionVisitor.h \ 26 | Visitor.h \ 27 | XorHandler.h \ 28 | ZshCompletionOutput.h \ 29 | sstream.h 30 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | 5 | /****************************************************************************** 6 | * 7 | * file: OptionalUnlabeledTracker.h 8 | * 9 | * Copyright (c) 2005, Michael E. Smoot . 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | 26 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 27 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 28 | 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | class OptionalUnlabeledTracker 34 | { 35 | 36 | public: 37 | 38 | static void check( bool req, const std::string& argName ); 39 | 40 | static void gotOptional() { alreadyOptionalRef() = true; } 41 | 42 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 43 | 44 | private: 45 | 46 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 47 | }; 48 | 49 | 50 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 51 | { 52 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 53 | throw( SpecificationException( 54 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 55 | argName ) ); 56 | 57 | if ( !req ) 58 | OptionalUnlabeledTracker::gotOptional(); 59 | } 60 | 61 | 62 | } // namespace TCLAP 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/StandardTraits.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: StandardTraits.h 6 | * 7 | * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot . 8 | * Copyright (c) 2017, Google LLC 9 | * All rights reserved. 10 | * 11 | * See the file COPYING in the top directory of this distribution for 12 | * more information. 13 | * 14 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | * DEALINGS IN THE SOFTWARE. 21 | * 22 | *****************************************************************************/ 23 | 24 | // This is an internal tclap file, you should probably not have to 25 | // include this directly 26 | 27 | #ifndef TCLAP_STANDARD_TRAITS_H 28 | #define TCLAP_STANDARD_TRAITS_H 29 | 30 | #ifdef HAVE_CONFIG_H 31 | #include // To check for long long 32 | #endif 33 | 34 | // If Microsoft has already typedef'd wchar_t as an unsigned 35 | // short, then compiles will break because it's as if we're 36 | // creating ArgTraits twice for unsigned short. Thus... 37 | #ifdef _MSC_VER 38 | #ifndef _NATIVE_WCHAR_T_DEFINED 39 | #define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS 40 | #endif 41 | #endif 42 | 43 | namespace TCLAP { 44 | 45 | // Integer types (signed, unsigned and bool) and floating point types all 46 | // have value-like semantics. 47 | 48 | // Strings have string like argument traits. 49 | template<> 50 | struct ArgTraits { 51 | typedef StringLike ValueCategory; 52 | }; 53 | 54 | template 55 | void SetString(T &dst, const std::string &src) 56 | { 57 | dst = src; 58 | } 59 | 60 | } // namespace 61 | 62 | #endif 63 | 64 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | 4 | /****************************************************************************** 5 | * 6 | * file: Visitor.h 7 | * 8 | * Copyright (c) 2003, Michael E. Smoot . 9 | * Copyright (c) 2017, Google LLC 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | 26 | #ifndef TCLAP_VISITOR_H 27 | #define TCLAP_VISITOR_H 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A base class that defines the interface for visitors. 33 | */ 34 | class Visitor 35 | { 36 | public: 37 | 38 | /** 39 | * Constructor. Does nothing. 40 | */ 41 | Visitor() { } 42 | 43 | /** 44 | * Destructor. Does nothing. 45 | */ 46 | virtual ~Visitor() { } 47 | 48 | /** 49 | * This method (to implemented by children) will be 50 | * called when the visitor is visited. 51 | */ 52 | virtual void visit() = 0; 53 | }; 54 | 55 | } 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /CAPI/tclap/include/tclap/sstream.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: sstream.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * Copyright (c) 2004, Michael E. Smoot, Daniel Aarno . 9 | * Copyright (c) 2017 Google Inc. 10 | * All rights reserved. 11 | * 12 | * See the file COPYING in the top directory of this distribution for 13 | * more information. 14 | * 15 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | *****************************************************************************/ 24 | 25 | #ifndef TCLAP_SSTREAM_H 26 | #define TCLAP_SSTREAM_H 27 | 28 | #if !defined(HAVE_STRSTREAM) 29 | // Assume sstream is available if strstream is not specified 30 | // (https://sourceforge.net/p/tclap/bugs/23/) 31 | #define HAVE_SSTREAM 32 | #endif 33 | 34 | #if defined(HAVE_SSTREAM) 35 | #include 36 | namespace TCLAP { 37 | typedef std::istringstream istringstream; 38 | typedef std::ostringstream ostringstream; 39 | } 40 | #elif defined(HAVE_STRSTREAM) 41 | #include 42 | namespace TCLAP { 43 | typedef std::istrstream istringstream; 44 | typedef std::ostrstream ostringstream; 45 | } 46 | #else 47 | #error "Need a stringstream (sstream or strstream) to compile!" 48 | #endif 49 | 50 | #endif // TCLAP_SSTREAM_H 51 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # THUAI5 社区开发者贡献指南 2 | 3 | ## 分支管理 4 | 5 | + `master`: 主分支,用于记录阶段性成果,由管理员维护,需要 2 个 approving reviews 6 | + `dev`: 用于记录最新进展,由开发者进行维护,需要 1 个 approving review 7 | 8 | ## 向 THUAI5 贡献代码 9 | 10 | + 将 `eesast/THUAI5` fork 到自己的仓库中 11 | + 基于 `dev` 分支建立一个新的功能分支 12 | + 在新的分支上进行修改与开发 13 | + 向 `eesast/THUAI5` 的 `dev` 分支提出 pull request 14 | + 等待社区人员进行 review 与 merge 15 | 16 | ## 向 THUAI5 贡献问题与思路 17 | 18 | 任何对 THUAI5 的建设有新思路的开发者、发现了 THUAI5 的 BUG 的人员,均可以在本仓库提出 issue。推荐使用本仓库设置的 issue 模板。 19 | 20 | ### 不要发布 “+1” 评论 21 | 22 | 类似于“+1”、“👍”、“\xxgg/”这类简短的无意义的评论不要出现在本仓库的评论中,推荐发表有意义的评论。 23 | 24 | ## 开发者交流 25 | 26 | 本仓库开启了“Discussion”,开发者可以在“Discussion”中进行沟通与交流。 27 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2022 EESAST 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Use this section to tell people how to report a vulnerability. 6 | 7 | **Please do not report security vulnerabilities through public GitHub issues.** Instead, please contact [liuxf19@163.com](liuxf19@163.com) to report them. 8 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /communication/.gitattributes: -------------------------------------------------------------------------------- 1 | Proro/** linguist-generated 2 | -------------------------------------------------------------------------------- /communication/ClientCommunication/ClientCommunication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0;net5.0 5 | disable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /communication/ClientTest/ClientTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /communication/Proto/Proto.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0;net5.0 5 | disable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /communication/README.md: -------------------------------------------------------------------------------- 1 | # communication 2 | 3 | ## 简介 4 | 5 | C# 通信组件 6 | 7 | ## 目标 8 | 9 | ### 基本目标 10 | 11 | + 基于 Protobuf 与 HPSocket,为服务器和客户端提供 C# 通信组件 12 | + 为服务器提供 ServerCommunication 通信组件,目标平台为 .NET 5 类库(可能根据开发进度改为 .NET 6) 13 | + 为客户端提供 ClientCommunication 通信组件,目标平台为 .NET 5 类库(可能根据开发进度改为 .NET 6)以及 .NET Standard 2.1(供 Unity 使用,可能根据开发进度升级版本) 14 | 15 | ## 重要目标 16 | 17 | + 确定好通信的方式,保证通信的高效 18 | + 修正 THUAI4 信息重复发送的问题 19 | + 将通信逻辑与游戏逻辑彻底分开,以供日后复用 20 | + 支持多终端游戏、观战等,尽量不对客户端人数、观战人数等做出任何假定,游戏人数完全由服务器决定 21 | + 去除往年遗留下来的以 Agent 作为通信中介的方式,改为客户端直连服务器 22 | 23 | ### 提高目标(饼) 24 | 25 | + 提供其他语言(如 Python、C#、Java 等)的选手接口 26 | + ……(未完待画) 27 | 28 | ## 注意事项 29 | 30 | + 客户端用于通信的类库需要生成两个目标平台,一个供 C# 服务器和客户端使用,目标平台采用 .NET 5(或 .NET 6);另一个供 Unity 使用,目标平台为 .NET Standard 2.1(可能根据开发进度升级版本)。可以先开发 `.NET 5/6` 版本,待 Unity 客户端编写完毕后再生成 `.NET Standard` 版本 31 | + 与其他组共同商定通信协议 32 | + 避免忙等待,注意线程安全,做好线程同步 33 | 34 | ## 一些想法 35 | 36 | 1. 命令行参数的问题基本已经解决,即使有,到时候只要与逻辑组稍加协商后就可改动,问题应该不大。 37 | 38 | 2. 关于ServerCommunication:现在可以发送的类有:MessageToInitialize,MessageToOperate,MessageToRefresh,MessageToOneClient。MessageToAddInstance和MessageToDestroyInstance已经嵌套在了MessageToOperate中,故不需要单独发送(而这两个类又嵌套了MessageOfProp和MessageOfBullet,更不需要单独发送了)。 39 | 40 | 3. 关于ServerTest:本来我想写得更细化一些,模拟一次完整的游戏过程,但考虑到我不太懂游戏逻辑,部分细节不明确,只好作罢( 41 | 42 | 4. 关于“如何降低proto文件和server的耦合关系”,我想做以下几点说明: 43 | 44 | * Message.cs中的枚举值PacketType是必须要根据protobuf文件改动的,这个确实没有更好的解决办法。 45 | * ServerCommunication.cs中的若干个重载函数,理论上可以都可以用一个IMessage接口实现,但考虑到发送的信息本身与逻辑息息相关,需要在终端输出不同的success、warning、error等提示信息,所以只好多一个类就多写一个重载。 46 | 47 | proto和server不能完全解耦,但改动思路还是比较简单的。 48 | 49 | ## 开发人员 50 | 51 | + ……(自己加) 52 | 53 | -------------------------------------------------------------------------------- /communication/ServerCommunication/ServerCommunication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | disable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /communication/ServerTest/ServerTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /communication/runClient.cmd: -------------------------------------------------------------------------------- 1 | start .\ClientTest\bin\Debug\net5.0\ClientTest.exe 0 0 127.0.0.1 7777 2 | start .\ClientTest\bin\Debug\net5.0\ClientTest.exe 0 1 127.0.0.1 7777 3 | start .\ClientTest\bin\Debug\net5.0\ClientTest.exe 1 0 127.0.0.1 7777 4 | start .\ClientTest\bin\Debug\net5.0\ClientTest.exe 1 1 127.0.0.1 7777 5 | -------------------------------------------------------------------------------- /communication/runServer.cmd: -------------------------------------------------------------------------------- 1 | .\ServerTest\bin\Debug\net5.0\ServerTest.exe -------------------------------------------------------------------------------- /dependency/Dockerfile/Dockerfile_compile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | Maintainer eesast.com 3 | WORKDIR /usr/local 4 | RUN mkdir /usr/local/mnt 5 | RUN apt-get update && apt-get install --no-install-recommends -y gcc g++ make libprotobuf-dev wget ca-certificates cmake autoconf automake libtool curl unzip 6 | COPY ./CAPI /usr/local/CAPI 7 | COPY ./dependency/shell/compile.sh ./ 8 | # RUN cd ./CAPI/protobuf && ./autogen.sh && ./configure && make && make install && ldconfig 9 | RUN cd /usr/local && mkdir ./CAPI/lib && wget -O dependency.zip https://cloud.tsinghua.edu.cn/f/9257418fd0ed40049c00/?dl=1 && unzip dependency.zip && mv -f ./linux/a ./CAPI/lib && mv -f ./linux/so ./CAPI/lib 10 | ENTRYPOINT ["bash", "compile.sh"] 11 | -------------------------------------------------------------------------------- /dependency/Dockerfile/Dockerfile_run: -------------------------------------------------------------------------------- 1 | FROM ubuntu:22.04 2 | Maintainer eesast.com 3 | WORKDIR /usr/local 4 | RUN mkdir /usr/local/team1 && mkdir /usr/local/team2 && mkdir /usr/local/playback && mkdir /usr/local/Server 5 | RUN apt-get update && apt-get install --no-install-recommends -y gcc g++ make libprotobuf-dev wget curl ca-certificates cmake autoconf automake libtool unzip 6 | RUN wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ 7 | && dpkg -i packages-microsoft-prod.deb \ 8 | && rm packages-microsoft-prod.deb 9 | RUN apt-get update && apt-get install -y apt-transport-https && apt-get update && apt-get install -y aspnetcore-runtime-5.0 10 | COPY ./CAPI /usr/local/CAPI 11 | COPY ./Server /usr/local/Server/ 12 | COPY ./dependency/shell/run.sh /usr/local/ 13 | # RUN cd /usr/local/CAPI/protobuf && ./autogen.sh && ./configure && make && make install && ldconfig 14 | RUN cd /usr/local && mkdir ./CAPI/lib && wget -O dependency.zip https://cloud.tsinghua.edu.cn/f/9257418fd0ed40049c00/?dl=1 && unzip dependency.zip && mv -f ./linux/a ./CAPI/lib && mv -f ./linux/so ./CAPI/lib 15 | ENTRYPOINT ["bash", "/usr/local/run.sh"] 16 | -------------------------------------------------------------------------------- /dependency/Dockerfile/README.md: -------------------------------------------------------------------------------- 1 | # Dockerfile 2 | 3 | Docker 镜像构建脚本 4 | 5 | -------------------------------------------------------------------------------- /dependency/README.md: -------------------------------------------------------------------------------- 1 | # dependency 2 | 3 | ## 简介 4 | 5 | 存放程序所需的依赖文件,例如程序编译必须的 .lib 与 .a、程序运行所需的 .dll 与 .so、Docker 配置文件 Dockerfile、Nuget 包 .nupkg、protobuf 源代码文件 .proto、shell 脚本 .sh,等等。 6 | 7 | ## 统一约定 8 | 9 | + 将对应后缀名的文件放入同名的子文件夹时,需要在子文件夹内再建立一个子文件夹,并在新建的文件夹内新建 README 介绍每个文件的用途。 10 | 11 | 12 | -------------------------------------------------------------------------------- /dependency/dll/README.md: -------------------------------------------------------------------------------- 1 | # dll 2 | 3 | 动态链接库 .dll 与 .so 4 | 5 | -------------------------------------------------------------------------------- /dependency/lib/README.md: -------------------------------------------------------------------------------- 1 | # lib 2 | 3 | 静态链接库 .lib 与 .a 4 | 5 | -------------------------------------------------------------------------------- /dependency/nupkg/README.md: -------------------------------------------------------------------------------- 1 | # nupkg 2 | 3 | .NET 类库文件 .nupkg 4 | 5 | -------------------------------------------------------------------------------- /dependency/proto/Message2Server.proto: -------------------------------------------------------------------------------- 1 | //Message2Server 2 | syntax = "proto3"; 3 | package Protobuf; 4 | option csharp_namespace = "Communication.Proto"; 5 | 6 | import "MessageType.proto"; 7 | import "Message2Clients.proto"; 8 | 9 | message MessageToServer 10 | { 11 | MessageType messageType = 1; 12 | int64 playerID = 2; //消息发送者的playerID 13 | int64 teamID = 3; //消息发送者所在队伍的ID 14 | PassiveSkillType pSkill = 4; //AddPlayer时添加的被动技能,下面是添加的两个主动技能。 15 | ActiveSkillType aSkill1 = 5; 16 | ActiveSkillType aSkill2 = 6; 17 | PropType propType = 7; //messageType为Pick时要捡起的道具类型 18 | int64 timeInMilliseconds = 8; //时间参数 19 | double angle = 9; //角度参数 20 | int32 gemSize = 10; //宝石量参数 21 | int64 ToPlayerID = 11; //当messageType为Send时有效,为发送对象的ID 22 | string message = 12; //当messageType为Send时有效,为发送的消息 23 | } 24 | 25 | -------------------------------------------------------------------------------- /dependency/proto/README.md: -------------------------------------------------------------------------------- 1 | # proto 2 | 3 | Protobuf 源代码文件 4 | 5 | ## 简要说明 6 | 7 | 我不清楚这是否是逻辑组原本的意思,但为了我能在开发时不会被绕晕,我还是简单总结一下改动吧。 8 | 9 | 1. Message2Clients中原本有一些关于GameObj的枚举,现在全部移到了MessageType中。 10 | 2. MessageToClient类被取消,取而代之的是更加具体的,代表各种GameObj的Message。 11 | -------------------------------------------------------------------------------- /dependency/proto/generate_cpp.cmd: -------------------------------------------------------------------------------- 1 | protoc --version 2 | protoc --cpp_out=. Message2Clients.proto 3 | protoc --cpp_out=. Message2Server.proto 4 | protoc --cpp_out=. MessageType.proto 5 | copy .\*.h ..\..\CAPI\proto\*.h 6 | copy .\*.cc ..\..\CAPI\proto\*.cc 7 | del *.h 8 | del *.cc 9 | -------------------------------------------------------------------------------- /dependency/proto/generate_cpp.sh: -------------------------------------------------------------------------------- 1 | protoc --version 2 | protoc --cpp_out=. Message2Clients.proto 3 | protoc --cpp_out=. Message2Server.proto 4 | protoc --cpp_out=. MessageType.proto 5 | mv ./*.h ../../CAPI/proto 6 | mv ./*.cc ../../CAPI/proto 7 | -------------------------------------------------------------------------------- /dependency/proto/generate_cs.cmd: -------------------------------------------------------------------------------- 1 | protoc --version 2 | protoc --csharp_out=. Message2Clients.proto 3 | protoc --csharp_out=. Message2Server.proto 4 | protoc --csharp_out=. MessageType.proto 5 | copy .\Message2Clients.cs ..\..\communication\Proto\Message2Clients.cs 6 | copy .\Message2Server.cs ..\..\communication\Proto\Message2Server.cs 7 | copy .\MessageType.cs ..\..\communication\Proto\MessageType.cs 8 | del Message2Clients.cs 9 | del Message2Server.cs 10 | del MessageType.cs -------------------------------------------------------------------------------- /dependency/proto/generate_cs.sh: -------------------------------------------------------------------------------- 1 | protoc --version 2 | protoc --csharp_out=. Message2Clients.proto 3 | protoc --csharp_out=. Message2Server.proto 4 | protoc --csharp_out=. MessageType.proto 5 | mv ./Message2Clients.cs ../../communication/Proto/Message2Clients.cs 6 | mv ./Message2Server.cs ../../communication/Proto/Message2Server.cs 7 | mv ./MessageType.cs ../../communication/Proto/MessageType.cs 8 | -------------------------------------------------------------------------------- /dependency/shell/BuildLogic.ps1: -------------------------------------------------------------------------------- 1 | param([string]$Dir = $(throw "Parameter missing: -Dir Directory to output")) 2 | dotnet publish "./logic/Server/Server.csproj" -c Release -r win-x64 --self-contained false -o $Dir 3 | dotnet publish "./logic/Client/Client.csproj" -c Release -r win-x64 --self-contained false -o $Dir -------------------------------------------------------------------------------- /dependency/shell/README.md: -------------------------------------------------------------------------------- 1 | # shell 2 | 3 | shell 脚本文件 .sh、.cmd、.ps1 等 4 | 5 | -------------------------------------------------------------------------------- /dependency/shell/compile.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # WORKDIR /usr/local/ 3 | cd ./CAPI 4 | i=1 5 | flag=1 6 | while (( $i <= 4 )) 7 | do 8 | cp -f ../mnt/player$i.cpp ./API/src 9 | mv ./API/src/player$i.cpp ./API/src/AI.cpp 10 | cmake ./CMakeLists.txt && make >compile_log$i.txt 2>&1 11 | mv ./capi ../mnt/capi$i 12 | if [ $? -ne 0 ]; then 13 | flag=0 14 | fi 15 | mv ./compile_log$i.txt ../mnt/compile_log$i.txt 16 | let "i++" 17 | done 18 | 19 | if [ $flag -eq 1 ]; then 20 | curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"compiled"}' > ../mnt/curl_log.txt 21 | else 22 | curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"compile_status":"failed"}' > ../mnt/curl_log.txt 23 | fi -------------------------------------------------------------------------------- /dependency/shell/run.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | cd /usr/local/Server 3 | ./Server --port 7777 --teamCount 2 --playerCount 4 --mapResource /usr/local/map/$MAP --gameTimeInSecond 600 --fileName /usr/local/playback/video --resultFileName /usr/local/playback/result >/usr/local/playback/server_log.txt 2>&1 & 4 | server_pid=$! 5 | sleep 5 6 | cd /usr/local/team1 7 | i=1 8 | while (( $i <= 4)) 9 | do 10 | ./capi$i -t 0 -p $[$i-1] -P 7777 -I 127.0.0.1 >/usr/local/playback/team1_log$i.txt 2>&1 & 11 | let "i++" 12 | done 13 | cd /usr/local/team2 14 | j=1 15 | while (( $j <= 4)) 16 | do 17 | ./capi$j -t 1 -p $[$j-1] -P 7777 -I 127.0.0.1 >/usr/local/playback/team2_log$j.txt 2>&1 & 18 | let "j++" 19 | done 20 | ps -p $server_pid 21 | while [ $? -eq 0 ] 22 | do 23 | sleep 1 24 | ps -p $server_pid 25 | done 26 | parse_json() { 27 | echo "${1//\"/}" | sed "s/.*$2:\([^,}]*\).*/\1/" 28 | } 29 | result=$(cat /usr/local/playback/result.json) 30 | score0=$(parse_json $result "Team0") 31 | score1=$(parse_json $result "Team1") 32 | curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}' -------------------------------------------------------------------------------- /experimental/CAPI/README.md: -------------------------------------------------------------------------------- 1 | # experimental/CAPI 2 | 3 | ## 简介 4 | 5 | 实验性选手接口 6 | 7 | -------------------------------------------------------------------------------- /experimental/CAPI/rust/README.md: -------------------------------------------------------------------------------- 1 | # CAPI/rust 2 | 3 | ## 简介 4 | 5 | Rust 通信组件及选手接口 6 | 7 | ## 开发人员 8 | 9 | + 刘雪枫 10 | + ……(自己加) 11 | 12 | -------------------------------------------------------------------------------- /experimental/README.md: -------------------------------------------------------------------------------- 1 | # experimental 2 | 3 | ## 简介 4 | 5 | 进行实验性功能的探索 6 | 7 | -------------------------------------------------------------------------------- /experimental/installer/README.md: -------------------------------------------------------------------------------- 1 | # experimental/ResumableDownloader 2 | 3 | 项目代码见[birdx-007/Resumable_Downloader: 支持断点续传的下载器(WPF应用程序) (github.com)](https://github.com/birdx-007/Resumable_Downloader)。 4 | 5 | ## 简介 6 | 7 | 实验性探索内容。支持断点续传的下载器。目前已有第一个可基本顺利运行的版本。 8 | 9 | 界面: 10 | ![](./pic/1.png) 11 | 12 | 搭建环境:.NET6.0 VS2022 基于C#的WPF应用程序 13 | 14 | 框架:Prism MVVM框架 15 | 16 | 实验人员:刘浩然 17 | 18 | 功能:输入下载链接、下载目录(下载目录可通过“预览”便捷选择)进行下载;若发现下载目录下有同名临时文件,则进行续传下载;下载中途暂停下载,继续下载,任意时刻取消下载;显示下载进度及下载速度。 19 | -------------------------------------------------------------------------------- /experimental/installer/pic/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/experimental/installer/pic/1.png -------------------------------------------------------------------------------- /installer/Installer/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /installer/Installer/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Installer 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /installer/Installer/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /installer/Installer/Installer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | true 8 | eesast_logo.ico 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /installer/Installer/eesast_logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/installer/Installer/eesast_logo.ico -------------------------------------------------------------------------------- /installer/Installer/eesast_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/installer/Installer/eesast_logo.jpg -------------------------------------------------------------------------------- /installer/README.md: -------------------------------------------------------------------------------- 1 | # installer 2 | 3 | ## 简介 4 | 5 | THUAI5 选手包下载器 6 | 7 | ## 目标 8 | 9 | ### 基本目标 10 | 11 | + 为 Windows 编写 WPF 桌面应用程序,目标平台 .NET 5,为选手提供下列功能:下载选手包、检查更新、更新选手包、重新下载选手包、暂停与继续下载(断点续传),等等 12 | 13 | ## 重要目标 14 | 15 | + 设计美观良好的 UI,便于选手操作 16 | + 注意对异常情况的处理,以免用户体验过差 17 | 18 | ## 提高目标(饼) 19 | 20 | + 与网站组对接,支持使用科协账号登录、提交比赛代码、查看天梯积分、进行实时对战、下载回放文件等功能 21 | + 使用 .NET 6,学习并使用 MAUI,实现下载器的跨平台,以供 Linux 选手使用 22 | + 在使用 MAUI 的基础上,配合界面组的 Unity 手机 APP,让下载器支持手机端下载 Unity APP 23 | + ……(未完待画) 24 | 25 | ## 开发人员 26 | 27 | + ……(自己加) 28 | 29 | -------------------------------------------------------------------------------- /installer/installer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31410.357 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Installer", "Installer\Installer.csproj", "{3B91FE03-E192-47A0-857B-F500B870C1E7}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {3B91FE03-E192-47A0-857B-F500B870C1E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {3B91FE03-E192-47A0-857B-F500B870C1E7}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {3B91FE03-E192-47A0-857B-F500B870C1E7}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {3B91FE03-E192-47A0-857B-F500B870C1E7}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {4ECA2C9B-719A-498E-A15F-D347FB2BDF14} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /interface/.vsconfig: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0", 3 | "components": [ 4 | "Microsoft.VisualStudio.Workload.ManagedGame" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /interface/Assets/Audio/CommonBombing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Audio/CommonBombing.wav -------------------------------------------------------------------------------- /interface/Assets/Audio/FastBombing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Audio/FastBombing.wav -------------------------------------------------------------------------------- /interface/Assets/Audio/LineBombing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Audio/LineBombing.wav -------------------------------------------------------------------------------- /interface/Assets/Audio/StrongBombing.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Audio/StrongBombing.wav -------------------------------------------------------------------------------- /interface/Assets/Renderer/UniversalRenderPipelineAsset.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3} 13 | m_Name: UniversalRenderPipelineAsset 14 | m_EditorClassIdentifier: 15 | k_AssetVersion: 6 16 | k_AssetPreviousVersion: 5 17 | m_RendererType: 1 18 | m_RendererData: {fileID: 0} 19 | m_RendererDataList: 20 | - {fileID: 11400000, guid: 2d54962d9dc34844a8ccb7abbe3caafe, type: 2} 21 | m_DefaultRendererIndex: 0 22 | m_RequireDepthTexture: 0 23 | m_RequireOpaqueTexture: 0 24 | m_OpaqueDownsampling: 1 25 | m_SupportsTerrainHoles: 1 26 | m_SupportsHDR: 1 27 | m_MSAA: 1 28 | m_RenderScale: 1 29 | m_MainLightRenderingMode: 1 30 | m_MainLightShadowsSupported: 1 31 | m_MainLightShadowmapResolution: 2048 32 | m_AdditionalLightsRenderingMode: 1 33 | m_AdditionalLightsPerObjectLimit: 4 34 | m_AdditionalLightShadowsSupported: 0 35 | m_AdditionalLightsShadowmapResolution: 512 36 | m_ShadowDistance: 50 37 | m_ShadowCascadeCount: 1 38 | m_Cascade2Split: 0.25 39 | m_Cascade3Split: {x: 0.1, y: 0.3} 40 | m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467} 41 | m_ShadowDepthBias: 1 42 | m_ShadowNormalBias: 1 43 | m_SoftShadowsSupported: 0 44 | m_UseSRPBatcher: 1 45 | m_SupportsDynamicBatching: 0 46 | m_MixedLightingSupported: 1 47 | m_DebugLevel: 0 48 | m_UseAdaptivePerformance: 1 49 | m_ColorGradingMode: 0 50 | m_ColorGradingLutSize: 32 51 | m_ShadowType: 1 52 | m_LocalShadowsSupported: 0 53 | m_LocalShadowsAtlasResolution: 256 54 | m_MaxPixelLights: 0 55 | m_ShadowAtlasResolution: 256 56 | m_ShaderVariantLogLevel: 0 57 | m_ShadowCascades: 0 58 | -------------------------------------------------------------------------------- /interface/Assets/Renderer/UniversalRenderPipelineAsset_Renderer.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: de640fe3d0db1804a85f9fc8f5cadab6, type: 3} 13 | m_Name: UniversalRenderPipelineAsset_Renderer 14 | m_EditorClassIdentifier: 15 | m_RendererFeatures: [] 16 | m_RendererFeatureMap: 17 | postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2} 18 | xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2} 19 | shaders: 20 | blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3} 21 | copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} 22 | screenSpaceShadowPS: {fileID: 4800000, guid: 0f854b35a0cf61a429bd5dcfea30eddd, type: 3} 23 | samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3} 24 | tileDepthInfoPS: {fileID: 0} 25 | tileDeferredPS: {fileID: 0} 26 | stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3} 27 | fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3} 28 | materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3} 29 | m_OpaqueLayerMask: 30 | serializedVersion: 2 31 | m_Bits: 4294967295 32 | m_TransparentLayerMask: 33 | serializedVersion: 2 34 | m_Bits: 4294967295 35 | m_DefaultStencilState: 36 | overrideStencilState: 0 37 | stencilReference: 0 38 | stencilCompareFunction: 8 39 | passOperation: 2 40 | failOperation: 0 41 | zFailOperation: 0 42 | m_ShadowTransparentReceive: 1 43 | m_RenderingMode: 0 44 | m_AccurateGbufferNormals: 0 45 | -------------------------------------------------------------------------------- /interface/Assets/Scripts/PlayerController.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Scripts/PlayerController.cs -------------------------------------------------------------------------------- /interface/Assets/Scripts/SceneTransfer.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | 6 | public class SceneTransfer : MonoBehaviour 7 | { 8 | private float _timeCounter = 0; 9 | 10 | private void Update() 11 | { 12 | _timeCounter += Time.deltaTime; 13 | if (_timeCounter > 3) 14 | { 15 | SceneManager.LoadScene(1); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /interface/Assets/Sprites/Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Background.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Battery.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Booster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Booster.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/CPU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/CPU.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/CPUFactory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/CPUFactory.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/CommonJammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/CommonJammer.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Electricity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Electricity.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/EndGameUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/EndGameUI.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/EnergyBall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/EnergyBall.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/FastJammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/FastJammer.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Flare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Flare.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/LineJammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/LineJammer.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/PlayerTeam1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/PlayerTeam1.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/PlayerTeam2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/PlayerTeam2.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Shader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Shader.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Shield.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Shield.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/StartGameUI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/StartGameUI.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/StrongJammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/StrongJammer.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Sword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Sword.png -------------------------------------------------------------------------------- /interface/Assets/Sprites/Wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/Sprites/Wall.png -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Anton.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Anton.ttf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Bangers.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Bangers.ttf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Electronic Highway Sign.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Electronic Highway Sign.TTF -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Oswald-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Oswald-Bold.ttf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Resources/Color Gradient Presets/Blue to Purple - Vertical.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3} 12 | m_Name: Blue to Purple - Vertical 13 | m_EditorClassIdentifier: 14 | topLeft: {r: 0, g: 0.83448267, b: 1, a: 1} 15 | topRight: {r: 0.1544118, g: 0.5801215, b: 1, a: 1} 16 | bottomLeft: {r: 0.49168324, g: 0, b: 0.7058823, a: 1} 17 | bottomRight: {r: 0.4901961, g: 0, b: 0.7019608, a: 1} 18 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Resources/Color Gradient Presets/Dark to Light Green - Vertical.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3} 12 | m_Name: Dark to Light Green - Vertical 13 | m_EditorClassIdentifier: 14 | topLeft: {r: 0, g: .661764741, b: 0, a: 1} 15 | topRight: {r: 0, g: .573529422, b: .00224910071, a: 1} 16 | bottomLeft: {r: .525490224, g: 1, b: .490196109, a: 1} 17 | bottomRight: {r: .421999991, g: .992156923, b: .374000013, a: 1} 18 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Resources/Color Gradient Presets/Light to Dark Green - Vertical.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3} 12 | m_Name: Light to Dark Green - Vertical 13 | m_EditorClassIdentifier: 14 | topLeft: {r: 0.5147059, g: 1, b: 0.5147059, a: 1} 15 | topRight: {r: 0.5137255, g: 1, b: 0.5137255, a: 1} 16 | bottomLeft: {r: 0, g: 0.46323532, b: 0, a: 1} 17 | bottomRight: {r: 0, g: 0.46274513, b: 0, a: 1} 18 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Resources/Color Gradient Presets/Yellow to Orange - Vertical.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_GameObject: {fileID: 0} 9 | m_Enabled: 1 10 | m_EditorHideFlags: 0 11 | m_Script: {fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0, type: 3} 12 | m_Name: Yellow to Orange - Vertical 13 | m_EditorClassIdentifier: 14 | topLeft: {r: 1, g: 1, b: 0.5661765, a: 1} 15 | topRight: {r: 1, g: 1, b: 0.252, a: 1} 16 | bottomLeft: {r: 1, g: 0, b: 0, a: 1} 17 | bottomRight: {r: 1, g: 0, b: 0, a: 1} 18 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Resources/Fonts & Materials/LiberationSans SDF - Overlay.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: LiberationSans SDF - Overlay 11 | m_Shader: {fileID: 4800000, guid: a02a7d8c237544f1962732b55a9aebf1, type: 3} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 5 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _MainTex: 23 | m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, 24 | type: 2} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | m_Floats: 28 | - _ColorMask: 15 29 | - _FaceDilate: 0 30 | - _GradientScale: 10 31 | - _MaskSoftnessX: 0 32 | - _MaskSoftnessY: 0 33 | - _OutlineSoftness: 0 34 | - _OutlineWidth: 0 35 | - _PerspectiveFilter: 0.875 36 | - _ScaleRatioA: 0.9 37 | - _ScaleRatioB: 1 38 | - _ScaleRatioC: 0.73125 39 | - _ScaleX: 1 40 | - _ScaleY: 1 41 | - _ShaderFlags: 0 42 | - _Sharpness: 0 43 | - _Stencil: 0 44 | - _StencilComp: 8 45 | - _StencilOp: 0 46 | - _StencilReadMask: 255 47 | - _StencilWriteMask: 255 48 | - _TextureHeight: 1024 49 | - _TextureWidth: 1024 50 | - _UnderlayDilate: 0 51 | - _UnderlayOffsetX: 0 52 | - _UnderlayOffsetY: 0 53 | - _UnderlaySoftness: 0 54 | - _VertexOffsetX: 0 55 | - _VertexOffsetY: 0 56 | - _WeightBold: 0.75 57 | - _WeightNormal: 0 58 | m_Colors: 59 | - _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} 60 | - _FaceColor: {r: 1, g: 1, b: 1, a: 1} 61 | - _OutlineColor: {r: 0, g: 0, b: 0, a: 1} 62 | - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} 63 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using TMPro; 4 | 5 | public class ChatController : MonoBehaviour { 6 | 7 | 8 | public TMP_InputField ChatInputField; 9 | 10 | public TMP_Text ChatDisplayOutput; 11 | 12 | public Scrollbar ChatScrollbar; 13 | 14 | void OnEnable() 15 | { 16 | ChatInputField.onSubmit.AddListener(AddToChatOutput); 17 | } 18 | 19 | void OnDisable() 20 | { 21 | ChatInputField.onSubmit.RemoveListener(AddToChatOutput); 22 | } 23 | 24 | 25 | void AddToChatOutput(string newText) 26 | { 27 | // Clear Input Field 28 | ChatInputField.text = string.Empty; 29 | 30 | var timeNow = System.DateTime.Now; 31 | 32 | string formattedInput = "[<#FFFF80>" + timeNow.Hour.ToString("d2") + ":" + timeNow.Minute.ToString("d2") + ":" + timeNow.Second.ToString("d2") + "] " + newText; 33 | 34 | if (ChatDisplayOutput != null) 35 | { 36 | // No special formatting for first entry 37 | // Add line feed before each subsequent entries 38 | if (ChatDisplayOutput.text == string.Empty) 39 | ChatDisplayOutput.text = formattedInput; 40 | else 41 | ChatDisplayOutput.text += "\n" + formattedInput; 42 | } 43 | 44 | // Keep Chat input field active 45 | ChatInputField.ActivateInputField(); 46 | 47 | // Set the scrollbar to the bottom when next text is submitted. 48 | ChatScrollbar.value = 0; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs: -------------------------------------------------------------------------------- 1 | using TMPro; 2 | using UnityEngine; 3 | 4 | public class DropdownSample: MonoBehaviour 5 | { 6 | [SerializeField] 7 | private TextMeshProUGUI text = null; 8 | 9 | [SerializeField] 10 | private TMP_Dropdown dropdownWithoutPlaceholder = null; 11 | 12 | [SerializeField] 13 | private TMP_Dropdown dropdownWithPlaceholder = null; 14 | 15 | public void OnButtonClick() 16 | { 17 | text.text = dropdownWithPlaceholder.value > -1 ? "Selected values:\n" + dropdownWithoutPlaceholder.value + " - " + dropdownWithPlaceholder.value : "Error: Please make a selection"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using TMPro; 4 | 5 | public class EnvMapAnimator : MonoBehaviour { 6 | 7 | //private Vector3 TranslationSpeeds; 8 | public Vector3 RotationSpeeds; 9 | private TMP_Text m_textMeshPro; 10 | private Material m_material; 11 | 12 | 13 | void Awake() 14 | { 15 | //Debug.Log("Awake() on Script called."); 16 | m_textMeshPro = GetComponent(); 17 | m_material = m_textMeshPro.fontSharedMaterial; 18 | } 19 | 20 | // Use this for initialization 21 | IEnumerator Start () 22 | { 23 | Matrix4x4 matrix = new Matrix4x4(); 24 | 25 | while (true) 26 | { 27 | //matrix.SetTRS(new Vector3 (Time.time * TranslationSpeeds.x, Time.time * TranslationSpeeds.y, Time.time * TranslationSpeeds.z), Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one); 28 | matrix.SetTRS(Vector3.zero, Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one); 29 | 30 | m_material.SetMatrix("_EnvMatrix", matrix); 31 | 32 | yield return null; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | 5 | namespace TMPro.Examples 6 | { 7 | 8 | public class ShaderPropAnimator : MonoBehaviour 9 | { 10 | 11 | private Renderer m_Renderer; 12 | private Material m_Material; 13 | 14 | public AnimationCurve GlowCurve; 15 | 16 | public float m_frame; 17 | 18 | void Awake() 19 | { 20 | // Cache a reference to object's renderer 21 | m_Renderer = GetComponent(); 22 | 23 | // Cache a reference to object's material and create an instance by doing so. 24 | m_Material = m_Renderer.material; 25 | } 26 | 27 | void Start() 28 | { 29 | StartCoroutine(AnimateProperties()); 30 | } 31 | 32 | IEnumerator AnimateProperties() 33 | { 34 | //float lightAngle; 35 | float glowPower; 36 | m_frame = Random.Range(0f, 1f); 37 | 38 | while (true) 39 | { 40 | //lightAngle = (m_Material.GetFloat(ShaderPropertyIDs.ID_LightAngle) + Time.deltaTime) % 6.2831853f; 41 | //m_Material.SetFloat(ShaderPropertyIDs.ID_LightAngle, lightAngle); 42 | 43 | glowPower = GlowCurve.Evaluate(m_frame); 44 | m_Material.SetFloat(ShaderUtilities.ID_GlowPower, glowPower); 45 | 46 | m_frame += Time.deltaTime * Random.Range(0.2f, 0.3f); 47 | yield return new WaitForEndOfFrame(); 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | 5 | namespace TMPro.Examples 6 | { 7 | 8 | public class SimpleScript : MonoBehaviour 9 | { 10 | 11 | private TextMeshPro m_textMeshPro; 12 | //private TMP_FontAsset m_FontAsset; 13 | 14 | private const string label = "The <#0050FF>count is: {0:2}"; 15 | private float m_frame; 16 | 17 | 18 | void Start() 19 | { 20 | // Add new TextMesh Pro Component 21 | m_textMeshPro = gameObject.AddComponent(); 22 | 23 | m_textMeshPro.autoSizeTextContainer = true; 24 | 25 | // Load the Font Asset to be used. 26 | //m_FontAsset = Resources.Load("Fonts & Materials/LiberationSans SDF", typeof(TMP_FontAsset)) as TMP_FontAsset; 27 | //m_textMeshPro.font = m_FontAsset; 28 | 29 | // Assign Material to TextMesh Pro Component 30 | //m_textMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF - Bevel", typeof(Material)) as Material; 31 | //m_textMeshPro.fontSharedMaterial.EnableKeyword("BEVEL_ON"); 32 | 33 | // Set various font settings. 34 | m_textMeshPro.fontSize = 48; 35 | 36 | m_textMeshPro.alignment = TextAlignmentOptions.Center; 37 | 38 | //m_textMeshPro.anchorDampening = true; // Has been deprecated but under consideration for re-implementation. 39 | //m_textMeshPro.enableAutoSizing = true; 40 | 41 | //m_textMeshPro.characterSpacing = 0.2f; 42 | //m_textMeshPro.wordSpacing = 0.1f; 43 | 44 | //m_textMeshPro.enableCulling = true; 45 | m_textMeshPro.enableWordWrapping = false; 46 | 47 | //textMeshPro.fontColor = new Color32(255, 255, 255, 255); 48 | } 49 | 50 | 51 | void Update() 52 | { 53 | m_textMeshPro.SetText(label, m_frame % 1000); 54 | m_frame += 1 * Time.deltaTime; 55 | } 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | 4 | 5 | namespace TMPro 6 | { 7 | /// 8 | /// EXample of a Custom Character Input Validator to only allow digits from 0 to 9. 9 | /// 10 | [Serializable] 11 | //[CreateAssetMenu(fileName = "InputValidator - Digits.asset", menuName = "TextMeshPro/Input Validators/Digits", order = 100)] 12 | public class TMP_DigitValidator : TMP_InputValidator 13 | { 14 | // Custom text input validation function 15 | public override char Validate(ref string text, ref int pos, char ch) 16 | { 17 | if (ch >= '0' && ch <= '9') 18 | { 19 | text += ch; 20 | pos += 1; 21 | return ch; 22 | } 23 | 24 | return (char)0; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Sprites/Default Sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Sprites/Default Sprites.png -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Sprites/DropCap Numbers.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Sprites/DropCap Numbers.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Brushed Metal 3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Brushed Metal 3.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Floor Cement.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Floor Cement.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Floor Tiles 1 - diffuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Floor Tiles 1 - diffuse.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Fruit Jelly (B&W).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Fruit Jelly (B&W).jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Diagonal (Color).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Diagonal (Color).jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Horizontal (Color).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Horizontal (Color).jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Vertical (Color).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Gradient Vertical (Color).jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Mask Zig-n-Zag.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Mask Zig-n-Zag.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Small Crate_diffuse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Small Crate_diffuse.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Small Crate_normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Small Crate_normal.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Sunny Days - Seamless.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Sunny Days - Seamless.jpg -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Text Overflow - Linked Text Image 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Text Overflow - Linked Text Image 1.png -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Text Overflow - Linked Text UI Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Text Overflow - Linked Text UI Screenshot.png -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Circle.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Circle.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Diagonal.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Diagonal.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Radial Double.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Radial Double.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Radial Quad.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Examples & Extras/Textures/Wipe Pattern - Radial Quad.psd -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Fonts/LiberationSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Fonts/LiberationSans.ttf -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt: -------------------------------------------------------------------------------- 1 | )]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt: -------------------------------------------------------------------------------- 1 | ([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇$¥₩ # -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Resources/TMP Settings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} 13 | m_Name: TMP Settings 14 | m_EditorClassIdentifier: 15 | m_enableWordWrapping: 1 16 | m_enableKerning: 1 17 | m_enableExtraPadding: 0 18 | m_enableTintAllSprites: 0 19 | m_enableParseEscapeCharacters: 1 20 | m_EnableRaycastTarget: 1 21 | m_GetFontFeaturesAtRuntime: 1 22 | m_missingGlyphCharacter: 0 23 | m_warningsDisabled: 0 24 | m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} 25 | m_defaultFontAssetPath: Fonts & Materials/ 26 | m_defaultFontSize: 36 27 | m_defaultAutoSizeMinRatio: 0.5 28 | m_defaultAutoSizeMaxRatio: 2 29 | m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} 30 | m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} 31 | m_autoSizeTextContainer: 0 32 | m_fallbackFontAssets: [] 33 | m_matchMaterialPreset: 1 34 | m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, 35 | type: 2} 36 | m_defaultSpriteAssetPath: Sprite Assets/ 37 | m_enableEmojiSupport: 1 38 | m_MissingCharacterSpriteUnicode: 0 39 | m_defaultColorGradientPresetsPath: Color Gradient Presets/ 40 | m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, 41 | type: 2} 42 | m_StyleSheetsResourcePath: 43 | m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} 44 | m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, 45 | type: 3} 46 | m_UseModernHangulLineBreakingRules: 0 47 | -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Sprites/EmojiOne Attribution.txt: -------------------------------------------------------------------------------- 1 | This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ 2 | 3 | Please visit their website to view the complete set of their emojis and review their licensing terms. -------------------------------------------------------------------------------- /interface/Assets/TextMesh Pro/Sprites/EmojiOne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/interface/Assets/TextMesh Pro/Sprites/EmojiOne.png -------------------------------------------------------------------------------- /interface/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /interface/ProjectSettings/AutoStreamingSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1200 &1 4 | AutoStreamingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | mSearchMode: 7 8 | mCustomSearchFile: 9 | mTextures: [] 10 | mAudios: [] 11 | mMeshes: [] 12 | mScenes: [] 13 | mConfigCCD: 14 | useCCD: 0 15 | cosKey: 16 | projectGuid: 17 | bucketUuid: 18 | bucketName: 19 | badgeName: 20 | -------------------------------------------------------------------------------- /interface/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /interface/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /interface/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 0 9 | path: 10 | guid: 00000000000000000000000000000000 11 | - enabled: 1 12 | path: Assets/Scenes/BeginScene.unity 13 | guid: fad286878c0085649a0a053692fbbc93 14 | - enabled: 1 15 | path: Assets/Scenes/MainScene.unity 16 | guid: 914db60a88dc3f24dbfad2da9b31d646 17 | - enabled: 1 18 | path: Assets/Scenes/EndScene.unity 19 | guid: bf2a33a914aa75f489e634016b227029 20 | m_configObjects: {} 21 | -------------------------------------------------------------------------------- /interface/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 10 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 1 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 4 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 31 | m_AssetPipelineMode: 1 32 | m_CacheServerMode: 0 33 | m_CacheServerEndpoint: 34 | m_CacheServerNamespacePrefix: default 35 | m_CacheServerEnableDownload: 1 36 | m_CacheServerEnableUpload: 1 37 | -------------------------------------------------------------------------------- /interface/ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /interface/ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /interface/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages-v2.unity.cn 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /interface/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /interface/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.18f1c1 2 | m_EditorVersionWithRevision: 2020.3.18f1c1 (94c5a6b4c040) 3 | -------------------------------------------------------------------------------- /interface/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | - name: Background 45 | uniqueID: 3068671187 46 | locked: 0 47 | - name: Item 48 | uniqueID: 3076979837 49 | locked: 0 50 | - name: Electricity 51 | uniqueID: 1549268577 52 | locked: 0 53 | - name: Player 54 | uniqueID: 1580701999 55 | locked: 0 56 | - name: BlindZone 57 | uniqueID: 759195083 58 | locked: 0 59 | - name: UI 60 | uniqueID: 1600092981 61 | locked: 0 62 | -------------------------------------------------------------------------------- /interface/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /interface/ProjectSettings/URPProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 247994e1f5a72c2419c26a37e9334c01, type: 3} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_LastMaterialVersion: 4 16 | -------------------------------------------------------------------------------- /interface/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_CNEventUrl: https://cdp.cloud.unity.cn/v1/events 14 | m_CNConfigUrl: https://cdp.cloud.unity.cn/config 15 | m_TestInitMode: 0 16 | CrashReportingSettings: 17 | m_EventUrl: https://perf-events.cloud.unity.cn 18 | m_Enabled: 0 19 | m_LogBufferSize: 10 20 | m_CaptureEditorExceptions: 1 21 | UnityPurchasingSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | UnityAnalyticsSettings: 25 | m_Enabled: 1 26 | m_TestMode: 0 27 | m_InitializeOnStartup: 1 28 | UnityAdsSettings: 29 | m_Enabled: 0 30 | m_InitializeOnStartup: 1 31 | m_TestMode: 0 32 | m_IosGameId: 33 | m_AndroidGameId: 34 | m_GameIds: {} 35 | m_GameId: 36 | PerformanceReportingSettings: 37 | m_Enabled: 0 38 | -------------------------------------------------------------------------------- /interface/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /interface/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /interface/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /interface/README.md: -------------------------------------------------------------------------------- 1 | # interface 2 | 3 | ## 简介 4 | 5 | Unity 客户端 6 | 7 | ## 目标 8 | 9 | ### 基本目标 10 | 11 | 生成 Windows 平台的 Unity 客户端,至少实现下列功能: 12 | 13 | + 直播观战:实时播放当前游戏画面 14 | + 游戏回放:读取回放文件并进行播放 15 | 16 | ### 重要目标 17 | 18 | + 支持玩家直接通过 Unity 进行游戏,以进行实时对战 19 | + 界面设计尽可能美观 20 | 21 | ### 提高目标(饼) 22 | 23 | + 生成适合 Web 的 Unity(须与网站组协商) 24 | + 生成手机 APP,支持手机客户端直播观战以及实时进行游戏等 25 | + ……(未完待画) 26 | 27 | ## 注意事项 28 | 29 | 编写好适合 Unity 的 .gitignore 文件,将必要的文件上传,既不要上传多余文件,也不要落下必需的文件 30 | 31 | ## 开发人员 32 | 33 | + 张子扬,邵晨扬 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /launcher/README.md: -------------------------------------------------------------------------------- 1 | # launcher 2 | 3 | ## 简介 4 | 5 | THUAI5 游戏启动器 6 | 7 | ## 目标 8 | 9 | ### 提高目标(饼) 10 | 11 | + 生成 Windows 平台的 WPF 应用程序,目标平台 .NET 5 12 | + 实现游戏启动的功能,选手可选队伍数、每队人数等游戏设置,可选启动客户端类型(Unity 界面、简易调试界面、选手 C++ 代码等)等启动设置 13 | + 使用 .NET 6,将 WPF 改用 MAUI,适合多种平台, 并能够根据平台自动选择启动的客户端 14 | 15 | ## 开发人员 16 | 17 | + ……(自己加) 18 | 19 | -------------------------------------------------------------------------------- /launcher/launcher.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31410.357 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher", "Launcher\Launcher.csproj", "{8F9B2D6C-8AA9-4F30-BC16-A53BF9F31CEE}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8F9B2D6C-8AA9-4F30-BC16-A53BF9F31CEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8F9B2D6C-8AA9-4F30-BC16-A53BF9F31CEE}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8F9B2D6C-8AA9-4F30-BC16-A53BF9F31CEE}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8F9B2D6C-8AA9-4F30-BC16-A53BF9F31CEE}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {2C931508-4D60-42A4-A68F-D0AF5A67C5DE} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /launcher/launcher/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /launcher/launcher/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Launcher 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /launcher/launcher/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /launcher/launcher/Launcher.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /launcher/launcher/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /launcher/launcher/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace Launcher 17 | { 18 | /// 19 | /// Interaction logic for MainWindow.xaml 20 | /// 21 | public partial class MainWindow : Window 22 | { 23 | public MainWindow() 24 | { 25 | InitializeComponent(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /logic/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # CS8632: 只能在 "#nullable" 注释上下文内的代码中使用可为 null 的引用类型的注释。 4 | dotnet_diagnostic.CS8632.severity = suggestion 5 | -------------------------------------------------------------------------------- /logic/CSharpInterface/CSharpInterface.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /logic/CSharpInterface/Competitor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | 4 | namespace CSharpInterface 5 | { 6 | public partial class ClientInterface 7 | { 8 | public readonly ActiveSkillType activeSkillType = ActiveSkillType.NuclearWeapon; 9 | public readonly PassiveSkillType passiveSkillType = PassiveSkillType.Vampire; 10 | 11 | int[,] map = null; 12 | Random random = new Random(); 13 | public void Play() 14 | { 15 | Thread.Sleep(10); 16 | var self = GetSelfInfo(); 17 | var props = GetNoGemProps(); 18 | foreach(var prop in props) 19 | { 20 | if (self.X / 1000 == prop.X / 1000 && self.Y / 1000 == prop.Y / 1000) 21 | { 22 | Pick(PropType.Null); 23 | } 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /logic/CSharpInterface/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace CSharpInterface 8 | { 9 | public static class Constants 10 | { 11 | public const long GameDuration = 600000; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /logic/CSharpInterface/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "CSharpInterface": { 4 | "commandName": "Project", 5 | "commandLineArgs": "1 0" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /logic/Client/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /logic/Client/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | 9 | namespace Client 10 | { 11 | /// 12 | /// Interaction logic for App.xaml 13 | /// 14 | public partial class App : Application 15 | { 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /logic/Client/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /logic/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | EESAST.ico 8 | enable 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Always 27 | 28 | 29 | Always 30 | 31 | 32 | 33 | 34 | 35 | Always 36 | 37 | 38 | Always 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /logic/Client/CommandLineArgs.cs: -------------------------------------------------------------------------------- 1 | using CommandLine; 2 | 3 | namespace Client 4 | { 5 | static class DefaultArgumentOptions 6 | { 7 | public static string FileName = "CLGG!@#$%^&*()_+"; // An impossible name of the playback file to indicate -f is not sepcified. 8 | } 9 | 10 | public class ArgumentOptions 11 | { 12 | [Option('u', "cl", Required = false, HelpText = "Whether to use command line")] 13 | public bool cl { get; set; } = false; 14 | 15 | [Option('i', "ip", Required = false, HelpText = "Client connected ip")] 16 | public string Ip { get; set; } = "127.0.0.1"; 17 | 18 | [Option('p', "port", Required = false, HelpText = "Client listening port")] 19 | public string Port { get; set; } = "7777"; 20 | 21 | [Option('t', "teamID", Required = false, HelpText = "Client teamID")] 22 | public string TeamID { get; set; } = "0"; 23 | 24 | [Option('c', "characterID", Required = false, HelpText = "Client playerID")] 25 | public string PlayerID { get; set; } = "0"; 26 | 27 | [Option('s', "software", Required = false, HelpText = "Client software")] 28 | public string Software { get; set; } = "0"; 29 | 30 | [Option('h', "hardware", Required = false, HelpText = "Client hardware")] 31 | public string Hardware { get; set; } = "0"; 32 | 33 | [Option('f', "playbackFile", Required = false, HelpText = "The playback file name.")] 34 | public string PlaybackFile { get; set; } = DefaultArgumentOptions.FileName; 35 | 36 | [Option("playbackSpeed", Required = false, HelpText = "The speed of the playback, between 0.25 and 4.0")] 37 | public double PlaybackSpeed { get; set; } = 1.0; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /logic/Client/ConnectRegister.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Threading; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Data; 10 | using System.Windows.Documents; 11 | using System.Windows.Input; 12 | using System.Windows.Media; 13 | using System.Windows.Media.Imaging; 14 | using System.Windows.Shapes; 15 | using System.IO; 16 | 17 | namespace Client 18 | { 19 | /// 20 | /// ConnectRegister.xaml 的交互逻辑 21 | /// 22 | public partial class ConnectRegister : Window 23 | { 24 | public ConnectRegister() 25 | { 26 | InitializeComponent(); 27 | } 28 | 29 | private void Save(object sender, RoutedEventArgs e) 30 | { 31 | try 32 | { 33 | if (!File.Exists(".\\ConnectInfo.txt")) 34 | { 35 | File.Create("ConnectInfo.txt"); 36 | State.Text = "Created File"; 37 | } 38 | else using (var sw = new StreamWriter(".\\ConnectInfo.txt")) 39 | { 40 | sw.WriteLine(IPBox.Text + " " + PortBox.Text + " " + PlayerIDBox.Text + " " + TeamIDBox.Text+" "+Pskill.Text+" "+Askill.Text); 41 | State.Text = "Info Registered."; 42 | } 43 | } 44 | catch (Exception exc) 45 | { 46 | State.Text = "Error:" + exc; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /logic/Client/EESAST.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/Client/EESAST.ico -------------------------------------------------------------------------------- /logic/Client/ErrorDisplayer.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /logic/Client/ErrorDisplayer.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Shapes; 14 | 15 | namespace Client 16 | { 17 | /// 18 | /// ErrorDisplayer.xaml 的交互逻辑 19 | /// 20 | public partial class ErrorDisplayer : Window 21 | { 22 | public ErrorDisplayer(string s) 23 | { 24 | InitializeComponent(); 25 | errorDisplayer.Text = s+" Time:"+DateTime.Now.ToString(); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /logic/Client/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/Client/Logo.png -------------------------------------------------------------------------------- /logic/Client/Player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/Client/Player.png -------------------------------------------------------------------------------- /logic/Client/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Client": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--cl --playbackFile=E:\\清华\\软件部\\队式\\THUAI5-TCL\\logic\\cmd\\video.thuaipb" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /logic/Client/StatusBar.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /logic/Client/Team.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/Client/Team.png -------------------------------------------------------------------------------- /logic/Client/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /logic/Client/Warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/Client/Warning.png -------------------------------------------------------------------------------- /logic/GameClass/GameClass.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/BombedBullet.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Utility; 2 | 3 | namespace GameClass.GameObj 4 | { 5 | // 为方便界面组做子弹爆炸特效,现引入“爆炸中的子弹”,在每帧发送给界面组 6 | public sealed class BombedBullet: GameObj 7 | { 8 | public override ShapeType Shape => ShapeType.Circle; 9 | public override bool IsRigid => false; 10 | public long MappingID { get; } 11 | public Bullet bulletHasBombed; 12 | public BombedBullet(Bullet bullet) : base(bullet.Position, bullet.Radius,bullet.Place) 13 | { 14 | this.bulletHasBombed = bullet; 15 | this.Type = GameObjType.BombedBullet; 16 | this.MappingID = bullet.ID; 17 | this.FacingDirection = bullet.FacingDirection; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Gem.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Interface; 2 | using Preparation.Utility; 3 | using Preparation.GameData; 4 | 5 | namespace GameClass.GameObj 6 | { 7 | public sealed class Gem: Prop //宝石算作一种特殊的道具 8 | { 9 | public override PropType GetPropType() 10 | { 11 | return PropType.Gem; 12 | } 13 | public Gem(XYPosition initPos,int size = 1) : base(initPos) 14 | { 15 | this.size = size; 16 | } 17 | /// 18 | /// 一个宝石块的大小 19 | /// 20 | private int size = 1; 21 | public int Size => size; 22 | 23 | public bool TryAddGemSize(int addSize = 1) 24 | { 25 | if (this.size >= GameData.MaxGemSize) 26 | return false; 27 | this.size++; 28 | return true; 29 | } 30 | public override ShapeType Shape => ShapeType.Circle; 31 | protected override bool IgnoreCollideExecutor(IGameObj targetObj) 32 | { 33 | if (targetObj.Type == GameObjType.BirthPoint || targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet || targetObj.Type == GameObjType.Character) return true; 34 | return false; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Map/BirthPoint.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Interface; 2 | using Preparation.Utility; 3 | using Preparation.GameData; 4 | 5 | namespace GameClass.GameObj 6 | { 7 | /// 8 | /// 出生点 9 | /// 10 | public class BirthPoint : ObjOfCharacter 11 | { 12 | public BirthPoint(XYPosition initPos) : base(initPos, GameData.numOfPosGridPerCell / 2, PlaceType.Land) 13 | { 14 | this.CanMove = false; 15 | this.Type = GameObjType.BirthPoint; 16 | } 17 | // 修改建议:需要避免非自己的玩家进入出生点,否则会重叠 18 | public override bool IsRigid => true; 19 | protected override bool IgnoreCollideExecutor(IGameObj targetObj) 20 | { 21 | if (targetObj.Type != GameObjType.Character) 22 | return true; // 非玩家不碰撞 23 | else if (targetObj.Type == GameObjType.Character && targetObj.ID == this.Parent.ID) 24 | return true; // 出生点所属的玩家不碰撞 25 | return false; 26 | } 27 | public override ShapeType Shape => ShapeType.Square; // 与THUAI4不同,改成了方形 28 | } 29 | } -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Map/GemWell.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Utility; 2 | using Preparation.GameData; 3 | using Preparation.Interface; 4 | 5 | namespace GameClass.GameObj 6 | { 7 | public class GemWell : GameObj 8 | { 9 | public GemWell(XYPosition initPos) : base(initPos, GameData.numOfPosGridPerCell / 2, PlaceType.Land) 10 | { 11 | this.CanMove = false; 12 | this.Type = GameObjType.GemWell; 13 | } 14 | public override bool IsRigid => false; 15 | protected override bool IgnoreCollideExecutor(IGameObj targetObj) => true; //宝石井不与任何东西碰撞 16 | public override ShapeType Shape => ShapeType.Square; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Map/Grass.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Interface; 2 | using Preparation.Utility; 3 | using Preparation.GameData; 4 | 5 | namespace GameClass.GameObj 6 | { 7 | /// 8 | /// 草丛 9 | /// 10 | public abstract class Grass : GameObj 11 | { 12 | public Grass(XYPosition initPos) : base(initPos, GameData.numOfPosGridPerCell / 2, PlaceType.Land) 13 | { 14 | this.CanMove = false; 15 | this.Type = GameObjType.Grass; 16 | } 17 | public override bool IsRigid => false; 18 | protected override bool IgnoreCollideExecutor(IGameObj targetObj) => true; //草丛不与任何东西碰撞 19 | public override ShapeType Shape => ShapeType.Square; 20 | } 21 | public class Grass1 : Grass 22 | { 23 | public Grass1(XYPosition initPos) : base(initPos) 24 | { 25 | this.Place = PlaceType.Grass1; 26 | } 27 | } 28 | public class Grass2 : Grass 29 | { 30 | public Grass2(XYPosition initPos) : base(initPos) 31 | { 32 | this.Place = PlaceType.Grass2; 33 | } 34 | } 35 | public class Grass3 : Grass 36 | { 37 | public Grass3(XYPosition initPos) : base(initPos) 38 | { 39 | this.Place = PlaceType.Grass1; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Map/MapGameTimer.cs: -------------------------------------------------------------------------------- 1 | using System.Threading; 2 | using Preparation.Interface; 3 | 4 | namespace GameClass.GameObj 5 | { 6 | public partial class Map 7 | { 8 | //xfgg说:爱因斯坦说,每个坐标系都有与之绑定的时钟,(x, y, z, ict) 构成四维时空坐标,在洛伦兹变换下满足矢量性(狗头) 9 | private readonly GameTimer timer = new(); 10 | public ITimer Timer => timer; 11 | public class GameTimer : ITimer 12 | { 13 | private bool isGaming = false; 14 | public bool IsGaming => isGaming; 15 | 16 | readonly object isGamingLock = new(); 17 | 18 | public bool StartGame(int timeInMilliseconds) 19 | { 20 | lock (isGamingLock) 21 | { 22 | if (isGaming) return false; 23 | isGaming = true; 24 | } 25 | Thread.Sleep(timeInMilliseconds); 26 | isGaming = false; 27 | return true; 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Map/Wall.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Utility; 2 | using Preparation.GameData; 3 | 4 | namespace GameClass.GameObj 5 | { 6 | /// 7 | /// 墙体 8 | /// 9 | public class Wall : GameObj 10 | { 11 | public Wall(XYPosition initPos) : base(initPos, GameData.numOfPosGridPerCell / 2, PlaceType.Land) 12 | { 13 | this.CanMove = false; 14 | this.Type = GameObjType.Wall; 15 | } 16 | public override bool IsRigid => true; 17 | public override ShapeType Shape => ShapeType.Square; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/ObjOfCharacter.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Interface; 2 | using Preparation.Utility; 3 | 4 | namespace GameClass.GameObj 5 | { 6 | /// 7 | /// 所有物,玩家可以存进“物品栏”的东西 8 | /// 9 | public abstract class ObjOfCharacter : GameObj, IObjOfCharacter 10 | { 11 | private ICharacter? parent = null; //主人 12 | public ICharacter? Parent 13 | { 14 | get => parent; 15 | set 16 | { 17 | lock (gameObjLock) 18 | { 19 | parent = value; 20 | } 21 | } 22 | } 23 | // LHR注:本来考虑在构造函数里设置parent属性,见THUAI4在游戏引擎中才设置该属性,作罢。——2021/9/24 24 | public ObjOfCharacter(XYPosition initPos, int initRadius, PlaceType initPlace) : base(initPos, initRadius, initPlace) { } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/OutOfBoundBlock.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Interface; 2 | using Preparation.Utility; 3 | 4 | namespace GameClass.GameObj 5 | { 6 | /// 7 | /// 逻辑墙 8 | /// 9 | public class OutOfBoundBlock : GameObj, IOutOfBound 10 | { 11 | public OutOfBoundBlock(XYPosition initPos) : base(initPos, int.MaxValue, PlaceType.Land) 12 | { 13 | this.CanMove = false; 14 | this.Type = GameObjType.OutOfBoundBlock; 15 | } 16 | 17 | public override bool IsRigid => true; 18 | public override ShapeType Shape => ShapeType.Square; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/PickedProp.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Utility; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace GameClass.GameObj 9 | { 10 | // 为方便界面组做道具拾起特效,现引入“被捡起的道具”,在每帧发送给界面组 11 | public class PickedProp: GameObj 12 | { 13 | public override ShapeType Shape => ShapeType.Circle; 14 | public override bool IsRigid => false; 15 | public long MappingID { get; } 16 | public Prop PropHasPicked; 17 | public PickedProp(Prop prop) : base(prop.Position, prop.Radius, prop.Place) 18 | { 19 | this.PropHasPicked = prop; 20 | this.Type = GameObjType.PickedProp; 21 | this.MappingID = prop.ID; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /logic/GameClass/GameObj/Team.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace GameClass.GameObj 4 | { 5 | public class Team 6 | { 7 | private static long currentMaxTeamID = 0; 8 | public static long CurrentMaxTeamID => currentMaxTeamID; 9 | private readonly long teamID; 10 | public long TeamID => teamID; 11 | public const long invalidTeamID = long.MaxValue; 12 | public const long noneTeamID = long.MinValue; 13 | private readonly List playerList; 14 | public int Score 15 | { 16 | get 17 | { 18 | int score = 0; 19 | foreach (var player in playerList) 20 | score += player.Score; 21 | return score; 22 | } 23 | } 24 | public Character? GetPlayer(long ID) 25 | { 26 | foreach (Character player in playerList) 27 | { 28 | if (player.ID == ID) 29 | { 30 | return player; 31 | } 32 | } 33 | return null; 34 | } 35 | public void AddPlayer(Character player) 36 | { 37 | playerList.Add(player); 38 | } 39 | public void OutPlayer(long ID) 40 | { 41 | int i; 42 | for (i = 0; i < playerList.Count; ++i) 43 | { 44 | if (playerList[i].ID == ID) break; 45 | } 46 | playerList.RemoveAt(i); 47 | } 48 | public long[] GetPlayerIDs() 49 | { 50 | long[] playerIDs = new long[playerList.Count]; 51 | int num = 0; 52 | foreach (Character player in playerList) 53 | { 54 | playerIDs[num++] = player.ID; 55 | } 56 | return playerIDs; 57 | } 58 | public static bool teamExists(long findTeamID) 59 | { 60 | return findTeamID < currentMaxTeamID; 61 | } 62 | public Team() 63 | { 64 | teamID = currentMaxTeamID++; 65 | playerList = new List(); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /logic/GameClass/Skill/ISkill.cs: -------------------------------------------------------------------------------- 1 | using GameClass.GameObj; 2 | using Preparation.Utility; 3 | using System.Threading; 4 | 5 | namespace GameClass.Skill 6 | { 7 | public interface IPassiveSkill 8 | { 9 | public BulletType InitBullet { get; } 10 | public void SkillEffect(Character player); 11 | } 12 | public interface ICommonSkill 13 | { 14 | public int MoveSpeed { get; } 15 | public int MaxHp { get; } 16 | public int CD { get; } 17 | public int MaxBulletNum { get; } 18 | public bool SkillEffect(Character player); 19 | public int DurationTime { get; } //技能持续时间 20 | public int SkillCD { get; } 21 | public object CommonSkillLock { get; } 22 | } 23 | 24 | //public class UtimateSkill 25 | //{ 26 | // /*public double AttackRange { get; } 27 | // public double BulletBombRange { get; } 28 | // public int MaxBulletNum { get; } 29 | // public int AP { get; } 30 | // public int MaxHp { get; } 31 | // public int MoveSpeed { get; } 32 | // public double BulletMoveSpeed { get; }*/ 33 | // public bool SkillEffect(Character player); 34 | // public int CD { get; } 35 | //} 36 | } 37 | -------------------------------------------------------------------------------- /logic/GameEngine/GameEngine.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Library 5 | net5.0 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /logic/Gaming/Gaming.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /logic/Gaming/SkillManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using GameClass.GameObj; 3 | 4 | namespace Gaming 5 | { 6 | public partial class Game 7 | { 8 | readonly SkillManager skillManager; 9 | private class SkillManager 10 | { 11 | public bool UseCommonSkill(Character character) 12 | { 13 | return character.UseCommonSkill(); 14 | } 15 | public void UsePassiveSkill(Character character) 16 | { 17 | character.UsePassiveSkill(); 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /logic/MapGenerator/MapGenerator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net5.0 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /logic/MapGenerator/MapGenerator.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32228.343 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapGenerator", "MapGenerator.csproj", "{AE7212C2-9F3B-4FB4-8DC7-46B4B7015D22}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {AE7212C2-9F3B-4FB4-8DC7-46B4B7015D22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {AE7212C2-9F3B-4FB4-8DC7-46B4B7015D22}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {AE7212C2-9F3B-4FB4-8DC7-46B4B7015D22}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {AE7212C2-9F3B-4FB4-8DC7-46B4B7015D22}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DA0A8C29-317C-47B1-B774-A2BDF9652DFA} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /logic/MapGenerator/README.md: -------------------------------------------------------------------------------- 1 | # THUAI5新工具:随机地图生成器! 2 | 3 | THUAI5开发时期创造的工具,可以生成随机的50*50地图。初衷是防止选手进行面向地图的编程。 4 | 5 | 随机地图生成算法由张鹤龄编写,地图后续处理及输出数组到文件由刘浩然编写。 6 | 7 | ## 使用方法 8 | 9 | 打开MapGenerator.sln,生成程序运行即可,输入非q的字符(串)即可生成。**(会覆盖之前的生成结果)** 10 | 11 | 命令行窗口会显示生成好的地图,生成的数组在.\bin\Debug\net5.0\map_array.txt中。 12 | 13 | 该数组可直接copy到MapInfo.cs里的对应位置,不过目前仍然需要人工添加出生点。 14 | 15 | -------------------------------------------------------------------------------- /logic/Message.md: -------------------------------------------------------------------------------- 1 | # Message 2 | 3 | - 下面的信息类型分别对应server中能够处理的消息类型 4 | - 需要指定的部分为protobuf的消息中,需要赋值的部分 5 | - 一般来说,发送的信息都应该包括TeamID, PlayerID,用来指定谁要做这件事 6 | 7 | ## AddPlayer 8 | 9 | - 初始化时应发送的信息 10 | - 需要指定:TeamID, PlayerID, PSkill(被动技能),ASkill1(主动技能) 11 | 12 | ## Move 13 | 14 | - 移动 15 | - 需要指定:TeamID, PlayerID, TimeInMilliseconds(移动时间), Angle(角度) 16 | 17 | ## Attack 18 | 19 | - 攻击 20 | - 需要指定:TeamID, PlayerID, Angle(角度) 21 | 22 | ## UseCommonSkill 23 | 24 | - 使用技能 25 | - 需要指定:TeamID, PlayerID 26 | 27 | ## Send 28 | 29 | - 向队友发信息 30 | - 需要指定:TeamID, PlayerID(这里的两个ID指的是接受者的ID,谁是发送者貌似是无法知道的) 31 | 32 | ## Pick 33 | 34 | - 捡道具 35 | - 需要指定:TeamID, PlayerID,PropType(要捡起的道具类型) 36 | 37 | ## UseProp 38 | 39 | - 使用道具(不包括宝石) 40 | - 需要指定:TeamID, PlayerID 41 | 42 | ## UseGem 43 | 44 | - 使用宝石,换取分数 45 | - 需要指定:TeamID, PlayerID, GemSize(使用的宝石数量) 46 | 47 | ## ThrowProp 48 | 49 | - 扔出道具 50 | - 需要指定:TeamID, PlayerID, TimeInMilliseconds, Angle 51 | 52 | ## ThrowGem 53 | 54 | - 扔出宝石 55 | - 需要指定:TeamID, PlayerID, TimeInMilliseconds, Angle, GemSize(扔出的宝石数量) 56 | 57 | # 对选手的限制 58 | 59 | ## 视野 60 | 61 | - 草丛外的人看不到草丛内的物体 62 | 63 | - 具体逻辑: 64 | 65 | - 根据消息中的place进行判断 66 | 67 | - 假设有物体A和物体B,它们的place分别记为Xa,Xb,那么A能否看到B呢? 68 | 69 | - ~~~c# 70 | // A发起请求要看到周围物体,下面分析B能否被A看见 71 | if (Xb == PlaceType.Invisible) //先判断B是否隐身,隐身则A看不见B 72 | return false; 73 | if (Xb == PlaceType.Land) //B是否在land上,若是,则A看得见B 74 | return true; 75 | if (Xa == Xb) //A和B是否在同一个草丛里,如果是,则A看的见B 76 | return true; 77 | return false; //A看不见B 78 | ~~~ 79 | 80 | - 视野要在客户端进行限制 81 | -------------------------------------------------------------------------------- /logic/Preparation/Deprecated/MoveableObj.cs: -------------------------------------------------------------------------------- 1 |  2 | //已弃用:MoveableObj类,包含属性在抽象/具体类实现 3 | 4 | /* 5 | using Preparation.Interface; 6 | using Preparation.Utility; 7 | 8 | namespace Preparation.GameObj 9 | { 10 | public abstract class MoveableObj: GameObj, IMoveable 11 | { 12 | private int moveSpeed; 13 | public int MoveSpeed 14 | { 15 | get => moveSpeed; 16 | set 17 | { 18 | lock(gameObjLock) 19 | { 20 | moveSpeed = value; 21 | } 22 | } 23 | } 24 | public override ShapeType Shape => ShapeType.Circle; //会移动的一定是圆形 25 | public MoveableObj(XYPosition initPos, int initRadius, PlaceType initPlace,int initSpeed):base(initPos,initRadius,initPlace) 26 | { 27 | moveSpeed = initSpeed; 28 | } 29 | protected abstract bool IgnoreCollision(IGameObj targetObj); 30 | public long Move(Vector moveVec) 31 | { 32 | var XYVec = Vector.Vector2XY(moveVec); 33 | lock (gameObjLock) 34 | { 35 | FacingDirection = moveVec.angle; 36 | this.Position += XYVec; 37 | } 38 | return (long)(XYVec.ToVector2()* new Vector2(0, 0)); 39 | } 40 | 41 | public virtual void Reset() //复活时数据重置 42 | { 43 | lock(gameObjLock) 44 | { 45 | FacingDirection = 0.0; 46 | IsMoving = false; 47 | CanMove = false; 48 | IsResetting = true; 49 | this.Position = birthPos; 50 | } 51 | } 52 | } 53 | } 54 | //*/ -------------------------------------------------------------------------------- /logic/Preparation/Interface/ICharacter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Preparation.Utility; 3 | 4 | namespace Preparation.Interface 5 | { 6 | public interface ICharacter : IGameObj 7 | { 8 | public long TeamID { get; } 9 | public int HP { get; set; } 10 | public double Vampire { get; } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/IGameObj.cs: -------------------------------------------------------------------------------- 1 | using Preparation.Utility; 2 | 3 | namespace Preparation.Interface 4 | { 5 | public interface IGameObj 6 | { 7 | public GameObjType Type { get; set; } 8 | public long ID { get; } 9 | public XYPosition Position { get; } // if Square, Pos equals the center 10 | public double FacingDirection { get; } 11 | public bool IsRigid { get; } 12 | public ShapeType Shape { get; } 13 | public bool CanMove { get; set; } 14 | public bool IsMoving { get; set; } 15 | public bool IsResetting { get; set; } // reviving 16 | public bool IsAvailable { get; } 17 | public int Radius { get; } // if Square, Radius equals half length of one side 18 | public PlaceType Place { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/IMap.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Threading; 3 | using Preparation.Utility; 4 | 5 | namespace Preparation.Interface 6 | { 7 | public interface IMap 8 | { 9 | ITimer Timer { get; } 10 | 11 | //the two dicts must have same keys 12 | Dictionary> GameObjDict { get; } 13 | Dictionary GameObjLockDict { get; } 14 | 15 | public bool IsOutOfBound(IGameObj obj); 16 | public IOutOfBound GetOutOfBound(XYPosition pos); //返回新建的一个OutOfBound对象 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/IMoveable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Preparation.Utility; 3 | 4 | namespace Preparation.Interface 5 | { 6 | public interface IMoveable : IGameObj 7 | { 8 | object MoveLock { get; } 9 | public int MoveSpeed { get; } 10 | public long Move(Vector moveVec); 11 | protected bool IgnoreCollide(IGameObj targetObj); // 忽略碰撞,在具体类中实现 12 | public bool WillCollideWith(IGameObj? targetObj, XYPosition nextPos) // 检查下一位置是否会和目标物碰撞 13 | { 14 | if (targetObj == null) 15 | return false; 16 | // 会移动的只有子弹和人物,都是Circle 17 | if (!targetObj.IsRigid || targetObj.ID == ID) 18 | return false; 19 | if (IgnoreCollide(targetObj)) 20 | return false; 21 | if (targetObj.Shape == ShapeType.Circle) 22 | { 23 | return XYPosition.Distance(nextPos, targetObj.Position) < targetObj.Radius + Radius; 24 | } 25 | else //Square 26 | { 27 | long deltaX = Math.Abs(nextPos.x - targetObj.Position.x), deltaY = Math.Abs(nextPos.y - targetObj.Position.y); 28 | if (deltaX >= targetObj.Radius + Radius || deltaY >= targetObj.Radius + Radius) return false; 29 | if (deltaX < targetObj.Radius || deltaY < targetObj.Radius) return true; 30 | else return ((long)(deltaX - targetObj.Radius) * (deltaX - targetObj.Radius)) + ((long)(deltaY - targetObj.Radius) * (deltaY - targetObj.Radius)) <= (long)Radius * (long)Radius; 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/IObjOfCharacter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Interface 4 | { 5 | public interface IObjOfCharacter : IGameObj 6 | { 7 | ICharacter? Parent { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/IOutOfBound.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Preparation.Interface 3 | { 4 | public interface IOutOfBound : IGameObj 5 | { 6 | // 接口不定义内容,为引擎使用 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /logic/Preparation/Interface/ITimer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Preparation.Interface 3 | { 4 | public interface ITimer 5 | { 6 | bool IsGaming { get; } 7 | public bool StartGame(int timeInMilliseconds); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /logic/Preparation/Preparation.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Library 5 | net5.0 6 | 7 | 8 | enable 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /logic/Preparation/Utility/Debugger.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Utility 4 | { 5 | public class Debugger 6 | { 7 | static public void Output(object current, string str) 8 | { 9 | #if DEBUG 10 | Console.WriteLine(current.GetType() + " " + current.ToString() + " " + str); 11 | #endif 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /logic/Preparation/Utility/MapEncoder.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Utility 4 | { 5 | public class MapEncoder 6 | { 7 | static public char Dec2Hex(int d) 8 | { 9 | return char.Parse(d.ToString("X")); 10 | } 11 | static public int Hex2Dec(char h) 12 | { 13 | string hexabet = "0123456789ABCDEF"; 14 | return hexabet.IndexOf(h); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /logic/Preparation/Utility/Tools.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Utility 4 | { 5 | public static class Tools 6 | { 7 | public static double CorrectAngle(double angle) //将幅角转化为主值0~2pi 8 | { 9 | if (double.IsNaN(angle) || double.IsInfinity(angle)) 10 | { 11 | return 0.0; 12 | } 13 | while (angle < 0) 14 | angle += 2 * Math.PI; 15 | while (angle >= 2 * Math.PI) 16 | angle -= 2 * Math.PI; 17 | return angle; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /logic/Preparation/Utility/Vector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Utility 4 | { 5 | public struct Vector 6 | { 7 | public double angle; 8 | public double length; 9 | 10 | public static XYPosition Vector2XY(Vector v) 11 | { 12 | return new XYPosition((int)(v.length * Math.Cos(v.angle)), (int)(v.length * Math.Sin(v.angle))); 13 | } 14 | public Vector2 ToVector2() 15 | { 16 | return new Vector2((int)(this.length * Math.Cos(this.angle)), (int)(this.length * Math.Sin(this.angle))); 17 | } 18 | public static Vector XY2Vector(double x, double y) 19 | { 20 | return new Vector(Math.Atan2(y, x), Math.Sqrt((x * x) + (y * y))); 21 | } 22 | public Vector(double angle, double length) 23 | { 24 | if (length < 0) 25 | { 26 | angle += Math.PI; 27 | length = -length; 28 | } 29 | this.angle = Tools.CorrectAngle(angle); 30 | this.length = length; 31 | } 32 | } 33 | 34 | public struct Vector2 35 | { 36 | public double x; 37 | public double y; 38 | public Vector2(double x, double y) 39 | { 40 | this.x = x; 41 | this.y = y; 42 | } 43 | 44 | public static double operator *(Vector2 v1, Vector2 v2) 45 | { 46 | return (v1.x * v2.x) + (v1.y * v2.y); 47 | } 48 | public static Vector2 operator +(Vector2 v1, Vector2 v2) 49 | { 50 | return new Vector2(v1.x + v2.x, v1.y + v2.y); 51 | } 52 | public static Vector2 operator -(Vector2 v1, Vector2 v2) 53 | { 54 | return new Vector2(v1.x - v2.x, v1.y - v2.y); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /logic/Preparation/Utility/XYPosition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Preparation.Utility 4 | { 5 | public struct XYPosition 6 | { 7 | public int x; 8 | public int y; 9 | public XYPosition(int x, int y) 10 | { 11 | this.x = x; 12 | this.y = y; 13 | } 14 | public override string ToString() 15 | { 16 | return "(" + x.ToString() + "," + y.ToString() + ")"; 17 | } 18 | public static XYPosition operator +(XYPosition p1, XYPosition p2) 19 | { 20 | return new XYPosition(p1.x + p2.x, p1.y + p2.y); 21 | } 22 | public static XYPosition operator -(XYPosition p1, XYPosition p2) 23 | { 24 | return new XYPosition(p1.x - p2.x, p1.y - p2.y); 25 | } 26 | public static double Distance(XYPosition p1, XYPosition p2) 27 | { 28 | return Math.Sqrt(((long)(p1.x - p2.x) * (p1.x - p2.x)) + ((long)(p1.y - p2.y) * (p1.y - p2.y))); 29 | } 30 | /*public static XYPosition[] GetSquareRange(uint edgeLen) // 从THUAI4的BULLET.CS移植而来,不知还有用否 31 | { 32 | XYPosition[] range = new XYPosition[edgeLen * edgeLen]; 33 | int offset = (int)(edgeLen >> 1); 34 | for (int i = 0; i < (int)edgeLen; ++i) 35 | { 36 | for (int j = 0; j < (int)edgeLen; ++j) 37 | { 38 | range[i * edgeLen + j].x = i - offset; 39 | range[i * edgeLen + j].y = j - offset; 40 | } 41 | } 42 | return range; 43 | }*/ 44 | public Vector2 ToVector2() 45 | { 46 | return new Vector2(this.x, this.y); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /logic/README.md: -------------------------------------------------------------------------------- 1 | # logic 2 | 3 | ## 简介 4 | 5 | 游戏逻辑与选手简易调试 GUI 客户端 6 | 7 | ## 逻辑架构 8 | 9 | ![structrue](img/structrue.jpg) 10 | 11 | ## 目标 12 | 13 | ### 基本目标 14 | 15 | + 编写游戏底层逻辑,生成 .NET 类库 16 | + 编写服务器端逻辑,生成 .NET 控制台应用程序 `Server`,服务器端逻辑应当至少实现: 17 | + 游戏的组队与运行 18 | + 回放文件的生成 19 | + 使用 WPF 或 Winform,为 Windows 平台编写简单的带有 2D 图形界面的客户端 `Client`,供选手在本地调试,客户端应当至少实现下面的功能: 20 | + 游戏直播观战 21 | + 回放文件的播放 22 | 23 | ### 重要目标 24 | 25 | + 分离游戏引擎、游戏逻辑与通信逻辑,使得游戏引擎和通信逻辑可以供日后复用 26 | + 调试客户端支持玩家手动对战 27 | + 使调试用客户端尽可能看起来清晰明了、运行快速,越简单越好(简单但不是简陋) 28 | 29 | ### 提高目标(饼) 30 | 31 | + 学习并使用 MAUI,实现调试客户端的跨平台 32 | 33 | ## 统一约定 34 | 35 | + 目标平台:.NET 5;可能根据进度改为 .NET 6(至少有一个开发组使用了 MAUI 时改为 .NET 6) 36 | 37 | ## 注意事项 38 | 39 | + 服务器的逻辑要特别注意鲁棒性和异常安全性,应当能够在各种极端情况下运行良好,对于选手的输入要进行各种合法检查,以避免某一位玩家的非法输入导致服务器崩溃而造成其他玩家也无法游戏的情形,例如浮点数的 `NaN` 与 `Inf`、枚举类型的值非法、运算的溢出,等等 40 | + 注意游戏引擎、游戏逻辑、服务器通信的相互分离,便于代码维护与复用 41 | + 设计好分工,分工前设计大致的代码架构,根据代码架构进行均匀合理的分工 42 | + 设计代码架构时,注意类与类之间、模块与模块之间尽量松耦合,每个部分的工作尽量相互独立,便于进行单元测试、BUG 修复,等等 43 | + 尽量考虑程序的通用性与可扩展性,便于以后加入新的功能;善于面向对象的设计模式,不要不用也不要乱用 44 | + 避免依赖过多的全局资源 45 | + 设计良好的调试接口,便于调试 46 | 47 | ## 特别说明 48 | 49 | + 在参考去年版本时注意,THUAI4 中 THUnity2D 项目存在历史遗留问题,因此设计上不尽人意。`Interfaces` 应当属于游戏引擎的内容,而 `ObjClasses` 应当属于游戏逻辑的内容,因此两者不应当在一个项目内 50 | 51 | ## 开发人员 52 | 53 | + 唐昌礼,张鹤龄,刘浩然 54 | 55 | -------------------------------------------------------------------------------- /logic/Server/HttpSender.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json.Linq; 2 | using System; 3 | using System.Net; 4 | using System.Text; 5 | 6 | namespace Server 7 | { 8 | class HttpSender 9 | { 10 | private string url; 11 | private string token; 12 | private string method; 13 | public HttpSender(string url, string token, string method) 14 | { 15 | this.url = url; 16 | this.token = token; 17 | this.method = method; 18 | } 19 | public void SendHttpRequest(JObject body) 20 | { 21 | try 22 | { 23 | var request = WebRequest.CreateHttp(url); 24 | request.Method = method; 25 | request.Headers.Add("Authorization", $"Bearer {token}"); 26 | 27 | request.ContentType = "application/json"; 28 | var raw = Encoding.UTF8.GetBytes(body.ToString()); 29 | request.GetRequestStream().Write(raw, 0, raw.Length); 30 | 31 | Console.WriteLine("Send to web successfully!"); 32 | var response = request.GetResponse(); 33 | Console.WriteLine($"Web response: {response}"); 34 | 35 | } 36 | catch (Exception e) 37 | { 38 | Console.WriteLine("Fail to send msg to web!"); 39 | Console.WriteLine(e); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /logic/Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Server": { 4 | "commandName": "Project", 5 | "commandLineArgs": "--port=7777 --teamCount=2 --playerCount=1 --gameTimeInSecond=600" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /logic/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /logic/Server/ServerBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading; 3 | using Communication.Proto; 4 | using Communication.ServerCommunication; 5 | 6 | namespace Server 7 | { 8 | public abstract class ServerBase 9 | { 10 | protected readonly ArgumentOptions options; 11 | 12 | protected readonly ServerCommunication serverCommunicator; 13 | public abstract int TeamCount { get; } 14 | public abstract int GetTeamScore(long teamID); 15 | public abstract void WaitForGame(); 16 | protected abstract void OnReceive(MessageToServer msg); 17 | 18 | public ServerBase(ArgumentOptions options) 19 | { 20 | //队伍数量在 1~4 之间,总人数不超过 8 21 | if (options.TeamCount > 4) 22 | options.TeamCount = 4; 23 | if (options.TeamCount < 1) 24 | options.TeamCount = 1; 25 | if (options.PlayerCountPerTeam * options.TeamCount > 8) 26 | options.PlayerCountPerTeam = (ushort)(8 / options.TeamCount); 27 | if (options.PlayerCountPerTeam < 1) 28 | options.PlayerCountPerTeam = 1; 29 | this.options = options; 30 | this.serverCommunicator = new ServerCommunication(); 31 | while (!serverCommunicator.Listen(options.ServerPort)) 32 | { 33 | Console.WriteLine("Server listens failed!"); 34 | Thread.Sleep(1000); 35 | } 36 | 37 | Console.WriteLine("Server begins to listen!"); 38 | 39 | serverCommunicator.OnConnect += () => 40 | { 41 | Console.WriteLine("Successfully connected!"); 42 | }; 43 | 44 | serverCommunicator.OnReceive += () => 45 | { 46 | if (serverCommunicator.TryTake(out IGameMessage msg) && msg.PacketType == PacketType.MessageToServer) 47 | { 48 | this.OnReceive((MessageToServer)msg.Content); 49 | } 50 | }; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /logic/Test/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Test": { 4 | "commandName": "Project" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /logic/Test/Test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net5.0 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /logic/bash/csharpclient.sh: -------------------------------------------------------------------------------- 1 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 0 0 & 2 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 0 1 & 3 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 0 2 & 4 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 0 3 & 5 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 1 0 & 6 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 1 1 & 7 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 1 2 & 8 | ../CsharpInterface/bin/Debug/net5.0/CsharpInterface 1 3 & 9 | wait 10 | exit -------------------------------------------------------------------------------- /logic/bash/gameServer_1.sh: -------------------------------------------------------------------------------- 1 | ../Server/bin/Debug/net5.0/Server --port=7777 --teamCount=1 --playerCount=1 --gameTimeInSecond=300 2 | -------------------------------------------------------------------------------- /logic/bash/gameServer_2.sh: -------------------------------------------------------------------------------- 1 | ../Server/bin/Debug/net5.0/Server --port=7777 --teamCount=2 --playerCount=1 --gameTimeInSecond=300 2 | -------------------------------------------------------------------------------- /logic/bash/gameServer_8.sh: -------------------------------------------------------------------------------- 1 | ../Server/bin/Debug/net5.0/Server --port=7777 --teamCount=2 --playerCount=4 --gameTimeInSecond=300 2 | -------------------------------------------------------------------------------- /logic/bash/testClient.sh: -------------------------------------------------------------------------------- 1 | ../Test/bin/Debug/net5.0/Test.exe 0 0 2 | 3 | ../Test/bin/Debug/net5.0/Test.exe 0 1 -------------------------------------------------------------------------------- /logic/cmd/CSharpClient.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 0 0 4 | 5 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 1 0 6 | 7 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 0 1 8 | 9 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 1 1 10 | 11 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 0 2 12 | 13 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 1 2 14 | 15 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 0 3 16 | 17 | start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 1 3 18 | 19 | ::start cmd /k ..\Client\bin\Debug\net5.0-windows\Client.exe --cl --port=7777 --teamID=5000 --characterID=5000 --software=3 --hardware=3 -------------------------------------------------------------------------------- /logic/cmd/ConnectInfo.txt: -------------------------------------------------------------------------------- 1 | 183.172.171.135 2 | -------------------------------------------------------------------------------- /logic/cmd/gameServer.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\Server\bin\Debug\net5.0\Server.exe --port 7777 --teamCount 1 --playerCount 1 --gameTimeInSecond 600 --fileName test --mapResource=./maps/testmap.txt 4 | 5 | start cmd /k ..\Client\bin\Debug\net5.0-windows\Client.exe --cl --port=7777 --teamID=0 --characterID=0 --software=3 --hardware=3 6 | 7 | ::start cmd /k ..\CSharpInterface\bin\Debug\net5.0\CSharpInterface.exe 0 0 8 | -------------------------------------------------------------------------------- /logic/cmd/gameServerforUnityonePerson.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\Server\bin\Debug\net5.0\Server.exe --port=7777 --teamCount=1 --playerCount=1 --gameTimeInSecond=100 --mapResource=testmap1.txt 4 | 5 | -------------------------------------------------------------------------------- /logic/cmd/img/wpf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/cmd/img/wpf.png -------------------------------------------------------------------------------- /logic/cmd/playback.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\Client\bin\Debug\net5.0-windows\Client.exe --cl --playbackSpeed=2.5 --playbackFile=e3bf32af-3932-4e66-a11a-d9cd4df9b6a7.thuaipb 4 | 5 | -------------------------------------------------------------------------------- /logic/cmd/playbackServer.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\Server\bin\Debug\net5.0\Server.exe --port=7777 --teamCount=2 --playerCount=4 --gameTimeInSecond=60 --fileName=video --playback 4 | 5 | start cmd /k ..\Client\bin\Debug\net5.0-windows\Client.exe -u --port=7777 --teamID=3330 --characterID=3330 --software=2 --hardware=2 6 | 7 | -------------------------------------------------------------------------------- /logic/cmd/testClient.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start cmd /k ..\Client\bin\Debug\net5.0-windows\Client.exe -u --port=7777 --teamID=0 --characterID=0 --software=4 --hardware=1 --ip=183.172.171.135 -------------------------------------------------------------------------------- /logic/img/structrue.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/logic/img/structrue.jpg -------------------------------------------------------------------------------- /playback/PlayBack/PlayBack.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net5.0 5 | enable 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /playback/PlayBack/PlaybackConstant.cs: -------------------------------------------------------------------------------- 1 | namespace Playback 2 | { 3 | public static class PlayBackConstant 4 | { 5 | public static string ExtendedName = ".thuaipb"; 6 | public static byte[] Prefix = { (byte)'P', (byte)'B', 5, 0 }; // 文件前缀,用于标识文件类型,版本号为5 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /playback/PlaybackForUnity/PlaybackConstantForUnity.cs: -------------------------------------------------------------------------------- 1 | namespace Playback 2 | { 3 | public static class PlaybackConstantForUnity 4 | { 5 | public static string ExtendedName = ".thuaipb"; 6 | public static byte[] Prefix = { (byte)'P', (byte)'B', 5, 0 }; // 文件前缀,用于标识文件类型 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /playback/PlaybackForUnity/PlaybackForUnity.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /playback/README.md: -------------------------------------------------------------------------------- 1 | # playback 2 | 3 | ## 简介 4 | 5 | 回放组件 6 | 7 | ## 目标 8 | 9 | ### 基本目标 10 | 11 | 生成供产生回放文件和读取回放文件的基本组件,生成 .NET 类库。 12 | 13 | ## 统一约定 14 | 15 | + 目标平台:`.NET Standard` 与 `.NET 5`(是否改用 `.NET 6` 视进度而定)类库,`.NET Standard` 版本供给 Unity 客户端使用,`.NET 5/6` 版本供给其他客户端与服务器使用。 16 | 17 | ## 特别说明 18 | 19 | + 本项目几乎可完全复用~~(照抄)~~去年的 THUAI4 20 | + 在去年的 THUAI4 中,`.NET Core 3.1` 版本位于 `playback` 项目内,而 `.NET Standard` 版本位于 `playbackForUnity` 目录内 21 | + 在去年的 THUAI4 中,回放文件播放器 `PlayBackPlayer`、`PlayBackPlayerDll`、`PlayBackPlayerResources` 的出现纯属意外,THUAI5 非必要则请不要编写类似的播放器,回放文件的读取与播放应该由 Unity 客户端与 logic 内的调试客户端两者完成 22 | 23 | ## 开发人员 24 | 25 | + ……(自己加) 26 | -------------------------------------------------------------------------------- /players/.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | -------------------------------------------------------------------------------- /players/README.md: -------------------------------------------------------------------------------- 1 | # 选手代码 2 | 3 | 本目录为 THUAI5 电子系“机算挑魁” 赛道决赛中,参赛队伍代码与测试队伍代码 -------------------------------------------------------------------------------- /players/龙门茶馆/player1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/players/龙门茶馆/player1.cpp -------------------------------------------------------------------------------- /players/龙门茶馆/player2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/players/龙门茶馆/player2.cpp -------------------------------------------------------------------------------- /players/龙门茶馆/player3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/players/龙门茶馆/player3.cpp -------------------------------------------------------------------------------- /players/龙门茶馆/player4.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/players/龙门茶馆/player4.cpp -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "dependencyDashboard": true, 6 | "timezone": "Asia/Shanghai", 7 | "schedule": "after 4am and before 8am every saturday", 8 | "labels": ["dependencies", "bot"], 9 | "packageRules": [ 10 | { 11 | "matchPackageNames": [ 12 | "HPSocket.Net" 13 | ], 14 | "allowedVersions": "<5.8.5" 15 | }, 16 | { 17 | "matchPackageNames": [ 18 | "Google.Protobuf" 19 | ], 20 | "allowedVersions": "<=3.19" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /resource/APIsettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/APIsettings.png -------------------------------------------------------------------------------- /resource/APIsettings2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/APIsettings2.png -------------------------------------------------------------------------------- /resource/README.md: -------------------------------------------------------------------------------- 1 | # resource 2 | 3 | 用于存放主目录内 README 所用资源 4 | 5 | **注:`main_interface.jpg` 用于包括科协赛事网站、Wiki 等多处游戏界面的展示,其路径、名称、扩展名等均不可更改!!!** 6 | -------------------------------------------------------------------------------- /resource/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/debug.png -------------------------------------------------------------------------------- /resource/eesast_logo_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/eesast_logo_32x32.png -------------------------------------------------------------------------------- /resource/main_interface.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/main_interface.jpg -------------------------------------------------------------------------------- /resource/no-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/no-debug.png -------------------------------------------------------------------------------- /resource/old_main_interface.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/old_main_interface.jpg -------------------------------------------------------------------------------- /resource/structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/structure.png -------------------------------------------------------------------------------- /resource/structure.vsdx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/structure.vsdx -------------------------------------------------------------------------------- /resource/tool_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/tool_1.png -------------------------------------------------------------------------------- /resource/tool_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/tool_2.png -------------------------------------------------------------------------------- /resource/tool_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/tool_3.png -------------------------------------------------------------------------------- /resource/tool_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eesast/THUAI5/7a6987c9fa125913ff13a9169d11ce3d2b79fd5f/resource/tool_4.png --------------------------------------------------------------------------------