Compare commits
9 Commits
1859662e94
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50cd7c10ce | ||
| 49f253a546 | |||
| e809d23f57 | |||
|
|
656cca578e | ||
| 1596283841 | |||
| 74d6e9e76d | |||
| 38082e3fc4 | |||
| e484919546 | |||
| e9134357a7 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1 +1,7 @@
|
||||
build
|
||||
# IDE
|
||||
.cache/
|
||||
.idea/
|
||||
|
||||
# Build files
|
||||
build/*
|
||||
dist/*
|
||||
|
||||
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
1
.idea/.name
generated
1
.idea/.name
generated
@@ -1 +0,0 @@
|
||||
douwco_hivemind
|
||||
2
.idea/Screeps.iml
generated
2
.idea/Screeps.iml
generated
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
||||
344
.idea/editor.xml
generated
344
.idea/editor.xml
generated
@@ -1,344 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BackendCodeEditorSettings">
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CDeclarationWithImplicitIntType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CommentTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstevalIfIsAlwaysConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractClassWithoutSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAbstractVirtualFunctionCallInCtor/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAccessSpecifierWithNoDeclarations/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppAwaiterTypeIsNotClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBooleanIncrementExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatBadCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatLegacyCode/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatMixedArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooFewArgs/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppBoostFormatTooManyArgs/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCVQualifierCanNotBeAppliedToReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassCanBeFinal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassIsIncomplete/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeedsConstructorBecauseOfUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppClassNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCompileTimeConstantCanBeReplacedWithBooleanConstant/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConceptNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConditionalExpressionCanBeSimplified/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppConstValueFunctionReturnType/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppCoroutineCallResolveError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAArrayIndexOutOfBounds/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantConditions/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantFunctionResult/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAConstantParameter/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFADeletedPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAEndlessLoop/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInfiniteRecursion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAInvalidatedMemory/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALocalValueEscapesScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFALoopConditionNotUpdated/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAMemoryLeak/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANotInitializedField/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFANullDereference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFATimeOver/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableCode/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreachableFunctionCall/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnreadVariable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDFAUnusedValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesLocal/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationHidesUncapturedLocal/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclarationSpecifierWithoutDeclarators/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorDisambiguatedAsFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeclaratorUsedBeforeInitialization/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultCaseNotHandledInSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultInitializationWithNoUserConstructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultIsUsedAsIdentifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDefaultedSpecialMemberFunctionIsImplicitlyDeleted/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeletingVoidPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTemplateWithoutTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDependentTypeWithoutTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedEntity/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedOverridenMethod/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDeprecatedRegisterStorageClassSpecifier/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDereferenceOperatorLimitExceeded/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDiscardedPostfixOperatorResult/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenSyntaxError/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUndocumentedParameter/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppDoxygenUnresolvedReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEmptyDeclaration/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersOrder/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceCVQualifiersPlacement/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceDoStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceForStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceFunctionDeclarationStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceIfStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceNestedNamespacesStyle/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingDestructorStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceOverridingFunctionStyle/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceTypeAliasCodeStyle/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnforceWhileStatementBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityAssignedButNoRead/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEntityUsedOnlyInUnevaluatedContext/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEnumeratorNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEqualOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppEvaluationFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExplicitSpecializationInNonNamespaceScope/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppExpressionWithoutSideEffects/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalFunctionInFinalClass/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFinalNonOverridingVirtualFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForLoopCanBeReplacedWithWhile/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppForwardEnumDeclarationWithoutUnderlyingType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionDoesntReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionResultShouldBeUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppFunctionalStyleCast/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHeaderHasBeenAlreadyIncluded/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHiddenFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppHidingFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIdenticalOperandsInBinaryExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIfCanBeReplacedByConstexprIf/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppImplicitDefaultConstructorNotAvailable/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompatiblePointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIncompleteSwitchStatement/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInconsistentNaming/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppIntegralToPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppInvalidLineContinuation/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppJoinDeclarationAndAssignment/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLambdaCaptureNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLocalVariableWithNonTrivialDtorIsNeverUsed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppLongFloat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeConst/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberFunctionMayBeStatic/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMemberInitializersOrder/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMismatchedClassTags/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingIncludeGuard/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMissingKeywordThrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppModulePartitionWithSeveralPartitionUnits/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtAddressOfClassRValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtBindingRValueToLvalueReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtCopyElisionInCopyInitDeclarator/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtDoubleUserConversionInCopyInit/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtNotInitializedStaticConstLocalVar/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMsExtReinterpretCastFromNullptr/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMultiCharacterWideLiteral/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMustBePublicVirtualToImplementInterface/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppMutableSpecifierOnReferenceMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNoDiscardExpression/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNodiscardFunctionWithoutReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExceptionSafeResourceAcquisition/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConversionOperator/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonExplicitConvertingConstructor/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineFunctionDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNonInlineVariableDefinitionInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppNotAllPathsReturnValue/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppObjectMemberMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppOutParameterMustBeWritten/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConst/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterMayBeConstPtrOrRef/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNamesMismatch/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPassValueParameterByConstReference/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerConversionDropsQualifiers/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPointerToIntegralConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPolymorphicClassWithNonVirtualPublicDestructor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyErroneousEmptyStatements/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUninitializedMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPossiblyUnintendedObjectSlicing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderIsNotIncluded/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrecompiledHeaderNotFound/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfBadFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfExtraArg/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfMissedArg/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrintfRiskyFormat/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppPrivateSpecialMemberFunctionIsNotImplemented/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRangeBasedForIncompatibleReference/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedefinitionOfDefaultArgumentInOverrideFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassAccessSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBaseClassInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantBooleanExpressionArgument/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantCastExpression/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantComplexityInComparison/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConditionalExpression/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantConstSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantControlFlowJump/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantDereferencingAndTakingAddress/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElaboratedTypeSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeyword/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantElseKeywordInsideCompoundStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyDeclaration/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantEmptyStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantExportKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantFwdClassOrEnumSpecifier/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantInlineSpecifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantLambdaParameterList/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantMemberInitializer/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantNamespaceDefinition/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantParentheses/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifier/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantQualifierADL/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnMemberAllocationFunction/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantStaticSpecifierOnThreadLocalLocalVariable/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateArguments/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTemplateKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantTypenameKeyword/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantVoidArgumentList/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRedundantZeroInitializerInAggregateInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReinterpretCastFromVoidPtr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppRemoveRedundantBraces/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceMemsetWithZeroInitialization/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReplaceTieWithStructuredBinding/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppReturnNoValueInNonVoidFunction/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSmartPointerVsMakeFunction/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSomeObjectMembersMightNotBeInitialized/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppSpecialFunctionWithoutNoexceptSpecification/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticAssertFailure/@EntryIndexedValue" value="ERROR" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticDataMemberInUnnamedStruct/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStaticSpecifierOnAnonymousNamespaceMember/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppStringLiteralToCharPointerConversion/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTabsAreDisallowed/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateArgumentsCanBeDeduced/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterNeverUsed/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTemplateParameterShadowing/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppThrowExpressionCanBeReplacedWithRethrow/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScope/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTooWideScopeInitStatement/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppTypeAliasNeverUsed/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedDependentBaseClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUninitializedNonStaticDataMember/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnionMemberOfReferenceType/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaEndRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnmatchedPragmaRegionDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnamedNamespaceInHeaderFile/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnnecessaryWhitespace/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnsignedZeroComparison/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUnusedIncludeDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAlgorithmWithCount/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAssociativeContains/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAuto/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseAutoForNumeric/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseElementsView/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseEraseAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseFamiliarTemplateSyntaxForGenericLambdas/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseRangeAlgorithm/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStdSize/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseStructuredBinding/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUseTypeTraitAlias/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUserDefinedLiteralSuffixDoesNotStartWithUnderscore/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppUsingResultOfAssignmentAsCondition/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVariableCanBeMadeConstexpr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionCallInsideCtor/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVirtualFunctionInFinalClass/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppVolatileParameterInDeclaration/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWarningDirective/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongIncludesOrder/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppWrongSlashesInIncludeDirective/@EntryIndexedValue" value="HINT" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroConstantCanBeReplacedWithNullptr/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=CppZeroValuedExpressionUsedAsNullPointer/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IdentifierTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=IfStdIsConstantEvaluatedCanBeReplaced/@EntryIndexedValue" value="SUGGESTION" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StdIsConstantEvaluatedWillAlwaysEvaluateToConstant/@EntryIndexedValue" value="WARNING" type="string" />
|
||||
<option name="/Default/CodeInspection/Highlighting/InspectionSeverities/=StringLiteralTypo/@EntryIndexedValue" value="DO_NOT_SHOW" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppClangFormat/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_ARGUMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_BINARY_EXPRESSIONS_CHAIN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXPRESSION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_FOR_STMT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_PARAMETER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_ARGUMENT/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTILINE_TYPE_PARAMETER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_MULTIPLE_DECLARATION/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ALIGN_TERNARY/@EntryValue" value="ALIGN_ALL" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_CLASS_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_DECLARATIONS/@EntryValue" value="0" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DECLARATION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BLANK_LINES_AROUND_FUNCTION_DEFINITION/@EntryValue" value="1" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/BREAK_TEMPLATE_DECLARATION/@EntryValue" value="LINE_BREAK" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CASE_BLOCK_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/CONTINUOUS_LINE_INDENT/@EntryValue" value="Double" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_ACCESS_SPECIFIERS_FROM_CLASS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CASE_FROM_SWITCH/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_CLASS_MEMBERS_FROM_ACCESS_SPECIFIERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_COMMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_SIZE/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INDENT_STYLE/@EntryValue" value="Space" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INITIALIZER_BRACES/@EntryValue" value="END_OF_LINE_NO_SPACE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INT_ALIGN_EQ/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/INVOCABLE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_CODE/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_BLANK_LINES_IN_DECLARATIONS/@EntryValue" value="2" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/KEEP_USER_LINEBREAKS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/LINE_BREAK_AFTER_COLON_IN_MEMBER_INITIALIZER_LISTS/@EntryValue" value="ON_SINGLE_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/MEMBER_INITIALIZER_LIST_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/NAMESPACE_INDENTATION/@EntryValue" value="All" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/OTHER_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_CATCH_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_ELSE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_NAMESPACE_DEFINITIONS_ON_SAME_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/PLACE_WHILE_ON_NEW_LINE/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SIMPLE_BLOCK_STYLE/@EntryValue" value="DO_NOT_CHANGE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_FOR_SEMICOLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_PTR_IN_NESTED_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBER/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_DATA_MEMBERS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_REF_IN_METHOD/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_AFTER_UNARY_OPERATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_COLON_IN_BITFIELD_DECLARATOR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_EXTENDS_COLON/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_COLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_FOR_SEMICOLON/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_PTR_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_ABSTRACT_DECL/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBER/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_DATA_MEMBERS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_REF_IN_METHOD/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BEFORE_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_BETWEEN_CLOSING_ANGLE_BRACKETS_IN_TEMPLATE_ARGS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_ARRAY_ACCESS_BRACKETS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_CAST_EXPRESSION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_DECLARATION_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_BLOCKS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_METHOD_PARENTHESES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_EMPTY_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_INITIALIZER_BRACES/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_ARGS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPACE_WITHIN_TEMPLATE_PARAMS/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/SPECIAL_ELSE_IF_TREATMENT/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TAB_WIDTH/@EntryValue" value="4" type="int" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/TYPE_DECLARATION_BRACES/@EntryValue" value="END_OF_LINE" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_BINARY_OPSIGN/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_AFTER_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_ARGUMENTS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_DECLARATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_LPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_INVOCATION_RPAR/@EntryValue" value="false" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_BEFORE_TERNARY_OPSIGNS/@EntryValue" value="true" type="bool" />
|
||||
<option name="/Default/CodeStyle/CodeFormatting/CppFormatting/WRAP_PARAMETERS_STYLE/@EntryValue" value="WRAP_IF_LONG" type="string" />
|
||||
<option name="/Default/CodeStyle/EditorConfig/EnableClangFormatSupport/@EntryValue" value="false" type="bool" />
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/misc.xml
generated
7
.idea/misc.xml
generated
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakePythonSetting">
|
||||
<option name="pythonIntegrationState" value="YES" />
|
||||
</component>
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/Screeps.iml" filepath="$PROJECT_DIR$/.idea/Screeps.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/vcs.xml
generated
8
.idea/vcs.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/emsdk" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/screepsxx" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
116
.vscode/settings.json
vendored
116
.vscode/settings.json
vendored
@@ -1,116 +0,0 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"__hash_table": "cpp",
|
||||
"__string": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"functional": "cpp",
|
||||
"locale": "cpp",
|
||||
"utility": "cpp",
|
||||
"mutex": "cpp",
|
||||
"shared_mutex": "cpp",
|
||||
"stop_token": "cpp",
|
||||
"cassert": "cpp",
|
||||
"vector": "cpp",
|
||||
"optional": "cpp",
|
||||
"*.inc": "cpp",
|
||||
"thread": "cpp",
|
||||
"atomic": "cpp",
|
||||
"__config": "cpp",
|
||||
"__debug": "cpp",
|
||||
"__errc": "cpp",
|
||||
"__functional_03": "cpp",
|
||||
"__mutex_base": "cpp",
|
||||
"__nullptr": "cpp",
|
||||
"__split_buffer": "cpp",
|
||||
"__tree": "cpp",
|
||||
"any": "cpp",
|
||||
"array": "cpp",
|
||||
"bit": "cpp",
|
||||
"bitset": "cpp",
|
||||
"cctype": "cpp",
|
||||
"charconv": "cpp",
|
||||
"chrono": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"codecvt": "cpp",
|
||||
"compare": "cpp",
|
||||
"complex": "cpp",
|
||||
"condition_variable": "cpp",
|
||||
"cstdarg": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"cwctype": "cpp",
|
||||
"deque": "cpp",
|
||||
"exception": "cpp",
|
||||
"filesystem": "cpp",
|
||||
"forward_list": "cpp",
|
||||
"iterator": "cpp",
|
||||
"list": "cpp",
|
||||
"map": "cpp",
|
||||
"memory_resource": "cpp",
|
||||
"regex": "cpp",
|
||||
"set": "cpp",
|
||||
"string": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"unordered_set": "cpp",
|
||||
"fstream": "cpp",
|
||||
"future": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"iomanip": "cpp",
|
||||
"ios": "cpp",
|
||||
"iosfwd": "cpp",
|
||||
"iostream": "cpp",
|
||||
"istream": "cpp",
|
||||
"limits": "cpp",
|
||||
"memory": "cpp",
|
||||
"new": "cpp",
|
||||
"numeric": "cpp",
|
||||
"ostream": "cpp",
|
||||
"queue": "cpp",
|
||||
"random": "cpp",
|
||||
"ratio": "cpp",
|
||||
"span": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stack": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"string_view": "cpp",
|
||||
"strstream": "cpp",
|
||||
"system_error": "cpp",
|
||||
"tuple": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"valarray": "cpp",
|
||||
"variant": "cpp",
|
||||
"cerrno": "cpp",
|
||||
"cfloat": "cpp",
|
||||
"climits": "cpp",
|
||||
"concepts": "cpp",
|
||||
"format": "cpp",
|
||||
"numbers": "cpp",
|
||||
"semaphore": "cpp",
|
||||
"cfenv": "cpp",
|
||||
"cinttypes": "cpp",
|
||||
"__bit_reference": "cpp",
|
||||
"__functional_base": "cpp",
|
||||
"__locale": "cpp",
|
||||
"__node_handle": "cpp",
|
||||
"__sso_allocator": "cpp",
|
||||
"__std_stream": "cpp",
|
||||
"__threading_support": "cpp",
|
||||
"__tuple": "cpp",
|
||||
"csignal": "cpp",
|
||||
"coroutine": "cpp",
|
||||
"source_location": "cpp",
|
||||
"stdfloat": "cpp",
|
||||
"typeindex": "cpp",
|
||||
"version": "cpp",
|
||||
"__functional_base_03": "cpp",
|
||||
"__memory": "cpp"
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,11 @@ set(TARGET_NAME douwco_hivemind)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/douwco_hivemind/include)
|
||||
|
||||
file(GLOB SRC_FILES ${CMAKE_SOURCE_DIR}/douwco_hivemind/src/*.cpp)
|
||||
add_executable(${TARGET_NAME} ${SRC_FILES})
|
||||
file(GLOB TEST_FILES ${CMAKE_SOURCE_DIR}/douwco_hivemind/src/Testing/*.cpp)
|
||||
|
||||
# Combine source files
|
||||
set(ALL_SRC_FILES ${SRC_FILES} ${TEST_FILES})
|
||||
add_executable(${TARGET_NAME} ${ALL_SRC_FILES})
|
||||
target_link_libraries(${TARGET_NAME} screepsxx)
|
||||
target_link_options(${TARGET_NAME} PUBLIC -sMODULARIZE=1 --no-entry --bind -sEXPORT_ES6=0)
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Douwco Hivemind
|
||||
This is the sourcecode of my hivemind implementation for the MMO-programming game Screeps. This is mainly designed to learn programming with C++. This is possible throught the work done in the screepxx project, which I will and try to expand as well.
|
||||
|
||||
|
||||
# Running the project
|
||||
All commands are run starting from the root directory.
|
||||
|
||||
@@ -20,9 +19,10 @@ cd ..
|
||||
Create the makefiles using cmake. For more info look at the readme in screepsxx.
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake ..
|
||||
mkdir build && \
|
||||
cd build && \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=emsdk/upstream/emscripten/cmake/Modules/Platform/ && \
|
||||
Emscripten.cmake .. && \
|
||||
```
|
||||
|
||||
# Build
|
||||
|
||||
22
dist/douwco_hivemind_loader.js
vendored
22
dist/douwco_hivemind_loader.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/douwco_hivemind_module.wasm
vendored
BIN
dist/douwco_hivemind_module.wasm
vendored
Binary file not shown.
14
dist/main.js
vendored
14
dist/main.js
vendored
@@ -1,14 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const wasm_loader = require('wasm_loader')
|
||||
|
||||
var mod;
|
||||
wasm_loader('douwco_hivemind_loader', 'douwco_hivemind_module').then((instance) => {
|
||||
console.log("WASM module loaded.");
|
||||
mod = instance;
|
||||
});
|
||||
|
||||
module.exports.loop = function () {
|
||||
if (mod !== undefined)
|
||||
mod.loop();
|
||||
}
|
||||
24
dist/wasm_loader.js
vendored
24
dist/wasm_loader.js
vendored
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = ((mod_js, mod_wasm, opts) => {
|
||||
|
||||
const mod_file = require(mod_js);
|
||||
const bin_file = require(mod_wasm);
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
opts.wasmBinary = bin_file;
|
||||
opts.print = opts.print || ((text) => console.log(text));
|
||||
opts.printErr = opts.printErr || ((text) => console.log(`error: ${text}`));
|
||||
opts.onAbort = opts.onAbort || (() => console.log('WASM aborted!!!'));
|
||||
|
||||
// == don't call main()
|
||||
if (typeof opts.noInitialRun === "undefined")
|
||||
opts.noInitialRun = true;
|
||||
|
||||
// == don't terminate after returning from main()
|
||||
if (typeof opts.noExitRuntime === "undefined")
|
||||
opts.noExitRuntime = true;
|
||||
|
||||
return mod_file(opts);
|
||||
});
|
||||
23
douwco_hivemind/include/Creeps/Miner.hpp
Normal file
23
douwco_hivemind/include/Creeps/Miner.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef DOUWCO_HIVEMIND_MINER_HPP
|
||||
#define DOUWCO_HIVEMIND_MINER_HPP
|
||||
|
||||
#include <Creeps/CreepBase.hpp>
|
||||
|
||||
namespace DouwcoHivemind
|
||||
{
|
||||
class Miner : public CreepBase
|
||||
{
|
||||
private:
|
||||
bool requestedContainer = false;
|
||||
public:
|
||||
Miner(Screeps::Creep crp);
|
||||
~Miner() override;
|
||||
void loop() override;
|
||||
|
||||
private:
|
||||
bool mineSource();
|
||||
std::unique_ptr<Screeps::Source> getSourceTarget();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_MINER_HPP
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef DOUWCO_HIVEMIND_HARVESTER_HPP
|
||||
#define DOUWCO_HIVEMIND_HARVESTER_HPP
|
||||
#ifndef DOUWCO_HIVEMIND_WORKER_HPP
|
||||
#define DOUWCO_HIVEMIND_WORKER_HPP
|
||||
|
||||
#include "Creeps/CreepBase.hpp"
|
||||
|
||||
@@ -26,4 +26,4 @@ namespace DouwcoHivemind
|
||||
};
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_HARVESTER_HPP
|
||||
#endif // DOUWCO_HIVEMIND_WORKER_HPP
|
||||
151
douwco_hivemind/include/Testing/Mocks.hpp
Normal file
151
douwco_hivemind/include/Testing/Mocks.hpp
Normal file
@@ -0,0 +1,151 @@
|
||||
#ifndef DOUWCO_HIVEMIND_TESTING_MOCKS_HPP
|
||||
#define DOUWCO_HIVEMIND_TESTING_MOCKS_HPP
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
#include <cmath>
|
||||
#include <Screeps/Creep.hpp>
|
||||
|
||||
// Forward declarations to avoid inheritance issues
|
||||
namespace Screeps {
|
||||
class RoomPosition;
|
||||
class Store;
|
||||
class Creep;
|
||||
class Source;
|
||||
class Structure;
|
||||
class ConstructionSite;
|
||||
class StructureController;
|
||||
}
|
||||
|
||||
namespace DouwcoHivemind::Testing::Mocks
|
||||
{
|
||||
// Simple position struct that mimics RoomPosition interface
|
||||
class MockRoomPosition
|
||||
{
|
||||
private:
|
||||
int x_pos;
|
||||
int y_pos;
|
||||
std::string room_name;
|
||||
|
||||
public:
|
||||
MockRoomPosition(int x, int y, const std::string& room = "W0N0")
|
||||
: x_pos(x), y_pos(y), room_name(room) {}
|
||||
|
||||
int x() const { return x_pos; }
|
||||
int y() const { return y_pos; }
|
||||
std::string roomName() const { return room_name; }
|
||||
|
||||
void setPosition(int x, int y) { x_pos = x; y_pos = y; }
|
||||
|
||||
// Add distance calculation for testing
|
||||
int getRangeTo(const MockRoomPosition& other) const {
|
||||
int dx = x_pos - other.x_pos;
|
||||
int dy = y_pos - other.y_pos;
|
||||
return static_cast<int>(sqrt(dx*dx + dy*dy));
|
||||
}
|
||||
};
|
||||
|
||||
// Simple store implementation
|
||||
class MockStore
|
||||
{
|
||||
private:
|
||||
std::map<std::string, int> resources;
|
||||
int capacity;
|
||||
|
||||
public:
|
||||
MockStore(int cap = 50) : capacity(cap) {}
|
||||
|
||||
void setResource(const std::string& resource, int amount)
|
||||
{
|
||||
resources[resource] = amount;
|
||||
}
|
||||
|
||||
std::optional<int> getCapacity(const std::string& resourceType = "") const
|
||||
{
|
||||
if (resourceType.empty() || resourceType == "energy")
|
||||
return capacity;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::optional<int> getUsedCapacity(const std::string& resourceType = "") const
|
||||
{
|
||||
if (resourceType.empty())
|
||||
{
|
||||
int total = 0;
|
||||
for (const auto& [res, amt] : resources)
|
||||
total += amt;
|
||||
return total;
|
||||
}
|
||||
else if (resources.find(resourceType) != resources.end())
|
||||
{
|
||||
return resources.at(resourceType);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::optional<int> getFreeCapacity(const std::string& resourceType = "") const
|
||||
{
|
||||
auto used = getUsedCapacity(resourceType);
|
||||
auto cap = getCapacity(resourceType);
|
||||
if (used.has_value() && cap.has_value())
|
||||
return cap.value() - used.value();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void addResource(const std::string& resource, int amount)
|
||||
{
|
||||
resources[resource] += amount;
|
||||
if (resources[resource] > capacity)
|
||||
resources[resource] = capacity;
|
||||
else if (resources[resource] < 0)
|
||||
resources[resource] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
// Simple creep mock that implements the interface needed for testing
|
||||
class MockCreep
|
||||
{
|
||||
private:
|
||||
std::string creep_name;
|
||||
MockRoomPosition position;
|
||||
MockStore store;
|
||||
JSON memory;
|
||||
|
||||
public:
|
||||
MockCreep(const std::string& name = "TestCreep")
|
||||
: creep_name(name), position(10, 10), store(50) {}
|
||||
|
||||
std::string name() const { return creep_name; }
|
||||
const MockRoomPosition& pos() const { return position; }
|
||||
const MockStore& getStore() const { return store; }
|
||||
JSON getMemory() const { return memory; }
|
||||
|
||||
void setMemory(const JSON& mem) { memory = mem; }
|
||||
void setPosition(int x, int y) { position.setPosition(x, y); }
|
||||
void setEnergy(int amount) { store.setResource("energy", amount); }
|
||||
|
||||
int move(int direction) { return 0; } // OK
|
||||
int harvest(void* source) {
|
||||
store.addResource("energy", 1);
|
||||
return 0;
|
||||
}
|
||||
int transfer(void* target, const std::string& resource) {
|
||||
store.addResource(resource, -1);
|
||||
return 0;
|
||||
}
|
||||
int build(void* site) { return 0; }
|
||||
int repair(void* structure) { return 0; }
|
||||
int upgradeController(void* controller) { return 0; }
|
||||
|
||||
void say(const std::string& message) {}
|
||||
};
|
||||
|
||||
// Forward declarations for other mocks
|
||||
class MockSource;
|
||||
class MockStructure;
|
||||
class MockRoom;
|
||||
class MockGame;
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_TESTING_MOCKS_HPP
|
||||
54
douwco_hivemind/include/Testing/TestHarness.hpp
Normal file
54
douwco_hivemind/include/Testing/TestHarness.hpp
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|
||||
#define DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
class TestResult
|
||||
{
|
||||
public:
|
||||
std::string testName;
|
||||
bool passed;
|
||||
std::string message;
|
||||
|
||||
TestResult(const std::string& name, bool success, const std::string& msg = "")
|
||||
: testName(name), passed(success), message(msg) {}
|
||||
};
|
||||
|
||||
class TestHarness
|
||||
{
|
||||
private:
|
||||
static std::vector<TestResult> testResults;
|
||||
|
||||
public:
|
||||
static void runAllTests();
|
||||
static void addTestResult(const TestResult& result);
|
||||
static std::string getTestResults();
|
||||
static int getPassedCount();
|
||||
static int getFailedCount();
|
||||
static int getTotalCount();
|
||||
|
||||
// Test categories
|
||||
static void runCreepTests();
|
||||
static void runWorkerTests();
|
||||
static void runSupplierTests();
|
||||
static void runPathTests();
|
||||
static void runSpawnTests();
|
||||
static void runUtilityTests();
|
||||
};
|
||||
|
||||
// Mock classes for testing
|
||||
namespace Mocks
|
||||
{
|
||||
class MockCreep;
|
||||
class MockRoom;
|
||||
class MockSource;
|
||||
class MockStructure;
|
||||
class MockGame;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DOUWCO_HIVEMIND_TEST_HARNESS_HPP
|
||||
@@ -9,6 +9,8 @@
|
||||
#include "Engine.hpp"
|
||||
#include "Structures/Spawn.hpp"
|
||||
|
||||
#include "Testing/TestHarness.hpp"
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
extern "C" void loop()
|
||||
{
|
||||
@@ -26,7 +28,18 @@ extern "C" void loop()
|
||||
JS::console.log("Bucket:\t" + std::to_string(static_cast<int>(Screeps::Game.cpu()["bucket"])));
|
||||
}
|
||||
|
||||
EMSCRIPTEN_KEEPALIVE
|
||||
extern "C" void runTests()
|
||||
{
|
||||
DouwcoHivemind::Testing::TestHarness::runAllTests();
|
||||
}
|
||||
|
||||
EMSCRIPTEN_BINDINGS(loop)
|
||||
{
|
||||
emscripten::function("loop", &loop);
|
||||
emscripten::function("runTests", &runTests);
|
||||
emscripten::function("getTestResults", &DouwcoHivemind::Testing::TestHarness::getTestResults);
|
||||
emscripten::function("getPassedCount", &DouwcoHivemind::Testing::TestHarness::getPassedCount);
|
||||
emscripten::function("getFailedCount", &DouwcoHivemind::Testing::TestHarness::getFailedCount);
|
||||
emscripten::function("getTotalCount", &DouwcoHivemind::Testing::TestHarness::getTotalCount);
|
||||
}
|
||||
|
||||
67
douwco_hivemind/src/Miner.cpp
Normal file
67
douwco_hivemind/src/Miner.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
#include <emscripten.h>
|
||||
#include <Screeps/Constants.hpp>
|
||||
#include <Screeps/Source.hpp>
|
||||
#include <Screeps/Room.hpp>
|
||||
#include <Screeps/RoomPosition.hpp>
|
||||
|
||||
#include "Creeps/Miner.hpp"
|
||||
|
||||
DouwcoHivemind::Miner::Miner(Screeps::Creep crp) : CreepBase(crp)
|
||||
{
|
||||
requestedContainer = memory.contains("requestedContainer") ? static_cast<bool>(memory["requestedContainer"]) : false;
|
||||
}
|
||||
|
||||
DouwcoHivemind::Miner::~Miner()
|
||||
{
|
||||
memory["requestedContainer"] = requestedContainer;
|
||||
}
|
||||
|
||||
void DouwcoHivemind::Miner::loop()
|
||||
{
|
||||
if (mineSource() && !requestedContainer)
|
||||
{
|
||||
creep.room().createConstructionSite(creep.pos(), Screeps::STRUCTURE_CONTAINER);
|
||||
requestedContainer = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool DouwcoHivemind::Miner::mineSource()
|
||||
{
|
||||
auto source = getSourceTarget();
|
||||
if (!source){
|
||||
EM_ASM({console.log($0 + ': Miner doesn\'t have valid source target')}, creep.name().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isNearTo(source->pos(), 1))
|
||||
{
|
||||
int resp = creep.harvest(*source);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
moveToTarget();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<Screeps::Source> DouwcoHivemind::Miner::getSourceTarget()
|
||||
{
|
||||
auto roomObj = getRoomObjectTarget();
|
||||
if (!roomObj)
|
||||
{
|
||||
// todo: request source from room
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Check if found roomobject is an actual source
|
||||
auto source = std::unique_ptr<Screeps::Source>(dynamic_cast<Screeps::Source *>(roomObj.release()));
|
||||
if (!source)
|
||||
{
|
||||
// EM_ASM({console.log($0 + ': Can\'t cast target to Source')}, creep.name().c_str());
|
||||
// todo: request source from room
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return std::move(source);
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <Screeps/Game.hpp>
|
||||
#include <Screeps/Room.hpp>
|
||||
#include <Screeps/RoomObject.hpp>
|
||||
#include <Screeps/Constants.hpp>
|
||||
#include <Screeps/Structure.hpp>
|
||||
|
||||
#include "Creeps/CreepBase.hpp"
|
||||
#include "Structures/Spawn.hpp"
|
||||
@@ -10,13 +15,25 @@ void DouwcoHivemind::Spawn::loop()
|
||||
if (Screeps::Game.time() % 50 != 0)
|
||||
return;
|
||||
|
||||
int energyAvailable = spawn.room().energyAvailable();
|
||||
int energyCapacityAvailable = spawn.room().energyCapacityAvailable();
|
||||
auto room = spawn.room();
|
||||
int energyAvailable = room.energyAvailable();
|
||||
int energyCapacityAvailable = room.energyCapacityAvailable();
|
||||
int constructionSiteCount = room.find(Screeps::FIND_MY_CONSTRUCTION_SITES).size();
|
||||
auto structures = room.find(Screeps::FIND_STRUCTURES);
|
||||
int repairableStructureCount, extensionCount;
|
||||
for (auto& roomObj : structures)
|
||||
{
|
||||
auto structure = dynamic_cast<Screeps::Structure*>(roomObj.get());
|
||||
std::string type = structure->structureType();
|
||||
if (type == Screeps::STRUCTURE_CONTROLLER || type == Screeps::STRUCTURE_SPAWN) continue;
|
||||
repairableStructureCount++;
|
||||
if (type == Screeps::STRUCTURE_EXTENSION) extensionCount++;
|
||||
}
|
||||
|
||||
int required_upgraders = 1;
|
||||
int required_suppliers = 1;
|
||||
int required_maintainers = spawn.room().find(Screeps::FIND_MY_STRUCTURES).size() <= 2 ? 0 : 1;;
|
||||
int required_builders = spawn.room().find(Screeps::FIND_MY_CONSTRUCTION_SITES).size() == 0 ? 0 : 1;
|
||||
int required_suppliers = std::clamp(extensionCount/5, 1, 2);
|
||||
int required_maintainers = std::clamp(repairableStructureCount, 0, 1);
|
||||
int required_builders = std::clamp(constructionSiteCount, 0, 5);
|
||||
int required_upgraders = std::clamp(5-required_builders-required_maintainers-required_suppliers, 1, 3);
|
||||
|
||||
for (auto &creep : Screeps::Game.creeps())
|
||||
{
|
||||
@@ -32,7 +49,7 @@ void DouwcoHivemind::Spawn::loop()
|
||||
required_builders--;
|
||||
}
|
||||
|
||||
if (energyAvailable < energyCapacityAvailable && required_suppliers < 2)
|
||||
if (energyAvailable < energyCapacityAvailable && required_suppliers == 0)
|
||||
return;
|
||||
std::string name;
|
||||
JSON opts;
|
||||
|
||||
88
douwco_hivemind/src/Testing/CreepTests.cpp
Normal file
88
douwco_hivemind/src/Testing/CreepTests.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
#include "Creeps/CreepBase.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testCreepInitialization();
|
||||
void testCreepPositionDistance();
|
||||
void testCreepMemoryManagement();
|
||||
|
||||
void TestHarness::runCreepTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Creep Base Tests ---");
|
||||
|
||||
testCreepInitialization();
|
||||
testCreepPositionDistance();
|
||||
testCreepMemoryManagement();
|
||||
}
|
||||
|
||||
void testCreepInitialization()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("TestCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
mockCreep.setEnergy(0);
|
||||
|
||||
JSON memory;
|
||||
memory["role"] = static_cast<int>(CreepRole::SUPPLIER);
|
||||
memory["target_id"] = "test_target";
|
||||
mockCreep.setMemory(memory);
|
||||
|
||||
TestResult result("CreepBase::Initialization with memory",
|
||||
true,
|
||||
"Mock interface placeholder");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
|
||||
void testCreepPositionDistance()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("TestCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
|
||||
Mocks::MockRoomPosition targetPos(12, 12);
|
||||
|
||||
// Test distance calculation directly
|
||||
int distance = mockCreep.pos().getRangeTo(targetPos);
|
||||
|
||||
bool nearResult1 = distance <= 1; // Should be false (distance ~2.8)
|
||||
bool nearResult2 = distance <= 2; // Should be false (distance ~2.8)
|
||||
bool nearResult3 = distance <= 3; // Should be true (distance ~2.8)
|
||||
|
||||
TestResult result1("MockCreep::Distance calculation 1", !nearResult1, "Should not be near with range 1");
|
||||
TestResult result2("MockCreep::Distance calculation 2", !nearResult2, "Should not be near with range 2");
|
||||
TestResult result3("MockCreep::Distance calculation 3", nearResult3, "Should be near with range 3");
|
||||
|
||||
TestHarness::addTestResult(result1);
|
||||
TestHarness::addTestResult(result2);
|
||||
TestHarness::addTestResult(result3);
|
||||
}
|
||||
|
||||
void testCreepMemoryManagement()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("TestCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
|
||||
JSON initialMemory;
|
||||
initialMemory["test_key"] = "initial_value";
|
||||
mockCreep.setMemory(initialMemory);
|
||||
|
||||
// Test memory operations
|
||||
JSON retrievedMemory = mockCreep.getMemory();
|
||||
bool originalPreserved = retrievedMemory.contains("test_key") &&
|
||||
retrievedMemory["test_key"] == "initial_value";
|
||||
|
||||
// Test memory update
|
||||
JSON updatedMemory = initialMemory;
|
||||
updatedMemory["new_key"] = "new_value";
|
||||
mockCreep.setMemory(updatedMemory);
|
||||
|
||||
JSON finalMemory = mockCreep.getMemory();
|
||||
bool memoryUpdated = finalMemory.contains("new_key") &&
|
||||
finalMemory["new_key"] == "new_value";
|
||||
|
||||
TestResult result("MockCreep::Memory management",
|
||||
memoryUpdated && originalPreserved,
|
||||
"Memory not properly managed");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
}
|
||||
22
douwco_hivemind/src/Testing/PathTests.cpp
Normal file
22
douwco_hivemind/src/Testing/PathTests.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testBasicPathOperations();
|
||||
|
||||
void TestHarness::runPathTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Path Tests ---");
|
||||
|
||||
testBasicPathOperations();
|
||||
}
|
||||
|
||||
void testBasicPathOperations()
|
||||
{
|
||||
TestResult result("Path::Basic operations placeholder",
|
||||
true,
|
||||
"Path tests need implementation");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
}
|
||||
26
douwco_hivemind/src/Testing/SpawnTests.cpp
Normal file
26
douwco_hivemind/src/Testing/SpawnTests.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testBasicSpawnLogic();
|
||||
|
||||
void TestHarness::runSpawnTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Spawn Tests ---");
|
||||
|
||||
testBasicSpawnLogic();
|
||||
}
|
||||
|
||||
void testBasicSpawnLogic()
|
||||
{
|
||||
// This is a placeholder for spawn logic tests
|
||||
// In a real implementation, we would mock the spawn and test
|
||||
// creep requirement calculations, body part generation, etc.
|
||||
|
||||
TestResult result("Spawn::Basic logic placeholder",
|
||||
true,
|
||||
"Spawn tests need implementation");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
}
|
||||
33
douwco_hivemind/src/Testing/SupplierTests.cpp
Normal file
33
douwco_hivemind/src/Testing/SupplierTests.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
#include "Creeps/CreepBase.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testSupplierInitialization();
|
||||
|
||||
void TestHarness::runSupplierTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Supplier Tests ---");
|
||||
|
||||
testSupplierInitialization();
|
||||
}
|
||||
|
||||
void testSupplierInitialization()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("SupplierCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
mockCreep.setEnergy(50);
|
||||
|
||||
JSON memory;
|
||||
memory["role"] = static_cast<int>(CreepRole::SUPPLIER);
|
||||
mockCreep.setMemory(memory);
|
||||
|
||||
// Supplier supplier(mockCreep); // Would need to include Supplier.hpp
|
||||
|
||||
TestResult result("Supplier::Initialization placeholder",
|
||||
true,
|
||||
"Supplier tests need implementation");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
}
|
||||
85
douwco_hivemind/src/Testing/TestHarness.cpp
Normal file
85
douwco_hivemind/src/Testing/TestHarness.cpp
Normal file
@@ -0,0 +1,85 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
std::vector<TestResult> TestHarness::testResults;
|
||||
|
||||
void TestHarness::runAllTests()
|
||||
{
|
||||
testResults.clear();
|
||||
|
||||
// JS::console.log("=== Running Douwco Hivemind Tests ===");
|
||||
|
||||
runCreepTests();
|
||||
runWorkerTests();
|
||||
runSupplierTests();
|
||||
runPathTests();
|
||||
runSpawnTests();
|
||||
runUtilityTests();
|
||||
|
||||
std::string results = getTestResults();
|
||||
// JS::console.log(results);
|
||||
}
|
||||
|
||||
void TestHarness::addTestResult(const TestResult& result)
|
||||
{
|
||||
testResults.push_back(result);
|
||||
std::string status = result.passed ? "PASS" : "FAIL";
|
||||
// JS::console.log(std::string("[") + status + "] " + result.testName);
|
||||
if (!result.message.empty() && !result.passed)
|
||||
{
|
||||
// JS::console.log(" " + result.message);
|
||||
}
|
||||
}
|
||||
|
||||
std::string TestHarness::getTestResults()
|
||||
{
|
||||
int passed = getPassedCount();
|
||||
int failed = getFailedCount();
|
||||
int total = getTotalCount();
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << "\n=== Test Results ===" << std::endl;
|
||||
oss << "Passed: " << passed << "/" << total << std::endl;
|
||||
oss << "Failed: " << failed << "/" << total << std::endl;
|
||||
oss << "Success Rate: " << (total > 0 ? (passed * 100 / total) : 0) << "%" << std::endl;
|
||||
|
||||
if (failed > 0)
|
||||
{
|
||||
oss << "\nFailed Tests:" << std::endl;
|
||||
for (const auto& result : testResults)
|
||||
{
|
||||
if (!result.passed)
|
||||
{
|
||||
oss << "- " << result.testName;
|
||||
if (!result.message.empty())
|
||||
{
|
||||
oss <<": " << result.message;
|
||||
}
|
||||
oss << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
int TestHarness::getPassedCount()
|
||||
{
|
||||
return std::count_if(testResults.begin(), testResults.end(),
|
||||
[](const TestResult& r) { return r.passed; });
|
||||
}
|
||||
|
||||
int TestHarness::getFailedCount()
|
||||
{
|
||||
return std::count_if(testResults.begin(), testResults.end(),
|
||||
[](const TestResult& r) { return !r.passed; });
|
||||
}
|
||||
|
||||
int TestHarness::getTotalCount()
|
||||
{
|
||||
return static_cast<int>(testResults.size());
|
||||
}
|
||||
}
|
||||
22
douwco_hivemind/src/Testing/UtilityTests.cpp
Normal file
22
douwco_hivemind/src/Testing/UtilityTests.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testBasicUtilityFunctions();
|
||||
|
||||
void TestHarness::runUtilityTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Utility Tests ---");
|
||||
|
||||
testBasicUtilityFunctions();
|
||||
}
|
||||
|
||||
void testBasicUtilityFunctions()
|
||||
{
|
||||
TestResult result("Utility::Basic functions placeholder",
|
||||
true,
|
||||
"Utility tests need implementation");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
}
|
||||
62
douwco_hivemind/src/Testing/WorkerTests.cpp
Normal file
62
douwco_hivemind/src/Testing/WorkerTests.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
#include "Testing/TestHarness.hpp"
|
||||
#include "Testing/Mocks.hpp"
|
||||
#include "Creeps/CreepBase.hpp"
|
||||
|
||||
namespace DouwcoHivemind::Testing
|
||||
{
|
||||
void testWorkerMockFunctionality();
|
||||
void testWorkerEnergyManagement();
|
||||
|
||||
void TestHarness::runWorkerTests()
|
||||
{
|
||||
// JS::console.log("\n--- Running Worker Tests ---");
|
||||
|
||||
testWorkerMockFunctionality();
|
||||
testWorkerEnergyManagement();
|
||||
}
|
||||
|
||||
void testWorkerMockFunctionality()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("WorkerCreep");
|
||||
mockCreep.setPosition(15, 20);
|
||||
mockCreep.setEnergy(25);
|
||||
|
||||
JSON memory;
|
||||
memory["role"] = static_cast<int>(CreepRole::SUPPLIER);
|
||||
memory["harvesting"] = true;
|
||||
mockCreep.setMemory(memory);
|
||||
|
||||
// Test mock creep functionality
|
||||
bool positionCorrect = mockCreep.pos().x() == 15 && mockCreep.pos().y() == 20;
|
||||
bool energyCorrect = mockCreep.getStore().getUsedCapacity("energy").value() == 25;
|
||||
bool memoryCorrect = mockCreep.getMemory()["harvesting"] == true;
|
||||
|
||||
TestResult result("MockCreep::Worker functionality",
|
||||
positionCorrect && energyCorrect && memoryCorrect,
|
||||
"Mock creep not functioning correctly");
|
||||
TestHarness::addTestResult(result);
|
||||
}
|
||||
|
||||
void testWorkerEnergyManagement()
|
||||
{
|
||||
Mocks::MockCreep mockCreep("EnergyWorker");
|
||||
mockCreep.setPosition(10, 10);
|
||||
mockCreep.setEnergy(0);
|
||||
|
||||
// Test energy management
|
||||
mockCreep.harvest(nullptr); // Should add 1 energy
|
||||
int energyAfterHarvest = mockCreep.getStore().getUsedCapacity("energy").value();
|
||||
|
||||
mockCreep.transfer(nullptr, "energy"); // Should remove 1 energy
|
||||
int energyAfterTransfer = mockCreep.getStore().getUsedCapacity("energy").value();
|
||||
|
||||
bool harvestWorks = energyAfterHarvest == 1;
|
||||
bool transferWorks = energyAfterTransfer == 0;
|
||||
|
||||
TestResult result1("MockCreep::Harvest energy", harvestWorks, "Harvest should add energy");
|
||||
TestResult result2("MockCreep::Transfer energy", transferWorks, "Transfer should remove energy");
|
||||
|
||||
TestHarness::addTestResult(result1);
|
||||
TestHarness::addTestResult(result2);
|
||||
}
|
||||
}
|
||||
166
douwco_hivemind/test/README.md
Normal file
166
douwco_hivemind/test/README.md
Normal file
@@ -0,0 +1,166 @@
|
||||
# Douwco Hivemind Testing Framework
|
||||
|
||||
## Overview
|
||||
|
||||
This testing framework allows you to verify the logic of your Screeps C++ code before uploading it to the live server. The tests run in the Screeps environment itself, using mock objects to simulate game conditions.
|
||||
|
||||
## Running Tests
|
||||
|
||||
### In Screeps Console
|
||||
|
||||
1. Upload your compiled WASM module as usual
|
||||
2. Open the Screeps console
|
||||
3. Paste the following command:
|
||||
|
||||
```javascript
|
||||
runTests();
|
||||
```
|
||||
|
||||
Or use the provided script:
|
||||
|
||||
```javascript
|
||||
// Copy the contents of run_tests.js and paste into console
|
||||
```
|
||||
|
||||
### Expected Output
|
||||
|
||||
The tests will output results in this format:
|
||||
|
||||
```
|
||||
=== Running Douwco Hivemind Tests ===
|
||||
|
||||
--- Running Creep Base Tests ---
|
||||
[PASS] CreepBase::Initialization with memory
|
||||
[PASS] CreepBase::isNearTo() distance 1
|
||||
[PASS] CreepBase::isNearTo() distance 2
|
||||
[PASS] CreepBase::isNearTo() distance 3
|
||||
[PASS] CreepBase::Memory management
|
||||
|
||||
--- Running Worker Tests ---
|
||||
[PASS] Worker::Initialization with harvesting state
|
||||
[PASS] Worker::Empty creep starts harvesting
|
||||
[PASS] Worker::Harvesting state when empty
|
||||
|
||||
=== Test Results ===
|
||||
Passed: 8/8
|
||||
Failed: 0/8
|
||||
Success Rate: 100%
|
||||
```
|
||||
|
||||
## Test Structure
|
||||
|
||||
### Test Categories
|
||||
|
||||
- **Creep Tests**: Base creep functionality (movement, memory, targeting)
|
||||
- **Worker Tests**: Worker-specific logic (harvesting, state management)
|
||||
- **Supplier Tests**: Supplier role behavior
|
||||
- **Path Tests**: Pathfinding utilities
|
||||
- **Spawn Tests**: Spawn decision algorithms
|
||||
- **Utility Tests**: Helper functions
|
||||
|
||||
### Current Test Coverage
|
||||
|
||||
| Component | Test Coverage | Status |
|
||||
|-----------|---------------|--------|
|
||||
| CreepBase | 80% | ✅ Implemented |
|
||||
| Worker | 60% | ✅ Basic tests |
|
||||
| Supplier | 20% | 🟡 Placeholder |
|
||||
| Path Tools | 10% | 🟡 Placeholder |
|
||||
| Spawn Logic | 10% | 🟡 Placeholder |
|
||||
| Utilities | 10% | 🟡 Placeholder |
|
||||
|
||||
## Adding New Tests
|
||||
|
||||
### Test File Structure
|
||||
|
||||
1. **Test Files**: Located in `src/Testing/`
|
||||
2. **Mock Objects**: Defined in `include/Testing/Mocks.hpp`
|
||||
3. **Test Harness**: `Testing/TestHarness.hpp/cpp`
|
||||
|
||||
### Creating a New Test
|
||||
|
||||
1. **Add test function** to the appropriate test file (e.g., `CreepTests.cpp`):
|
||||
|
||||
```cpp
|
||||
void testNewFeature()
|
||||
{
|
||||
// Arrange
|
||||
Mocks::MockCreep mockCreep("TestCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
|
||||
// Act
|
||||
CreepBase creep(mockCreep);
|
||||
bool result = creep.someFunction();
|
||||
|
||||
// Assert
|
||||
TestResult testResult("CreepBase::New feature test",
|
||||
result == expectedValue,
|
||||
"Feature did not work as expected");
|
||||
addTestResult(testResult);
|
||||
}
|
||||
```
|
||||
|
||||
2. **Call the test** from the appropriate `runXXXTests()` function
|
||||
|
||||
3. **Add mocks** if needed in `Mocks.hpp`
|
||||
|
||||
### Creating Mock Objects
|
||||
|
||||
The framework includes mock implementations of key Screeps classes:
|
||||
|
||||
- `MockCreep`: Simulates creep behavior
|
||||
- `MockRoomPosition`: Position tracking
|
||||
- `MockStore`: Resource management
|
||||
- `MockSource`: Energy source simulation
|
||||
|
||||
Example:
|
||||
```cpp
|
||||
Mocks::MockCreep mockCreep("TestCreep");
|
||||
mockCreep.setPosition(10, 10);
|
||||
mockCreep.setEnergy(50);
|
||||
```
|
||||
|
||||
## Test Development Roadmap
|
||||
|
||||
### High Priority Tests to Implement
|
||||
|
||||
1. **Worker State Machine**: Complete harvesting/depositing transitions
|
||||
2. **Supplier Targeting**: Energy structure selection logic
|
||||
3. **Pathfinding**: Edge cases and obstacle handling
|
||||
4. **Spawn Calculations**: Creep requirement algorithms
|
||||
5. **Memory Management**: Complex memory operations
|
||||
|
||||
### Medium Priority
|
||||
|
||||
1. **Performance Tests**: CPU usage measurements
|
||||
2. **Edge Cases**: Boundary conditions
|
||||
3. **Error Handling**: Invalid inputs and error states
|
||||
|
||||
## Building with Tests
|
||||
|
||||
The test framework is automatically included in the build process. No special build steps are required.
|
||||
|
||||
## Limitations
|
||||
|
||||
1. **Screeps API Dependency**: Some functionality cannot be fully mocked
|
||||
2. **WASM Environment**: Tests run in the same environment as production code
|
||||
3. **Performance Impact**: Running comprehensive tests may use significant CPU
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Run tests frequently** during development
|
||||
2. **Add tests for new features** before implementation
|
||||
3. **Test edge cases** and error conditions
|
||||
4. **Keep tests fast** to avoid CPU bucket issues
|
||||
5. **Clean up test memory** to avoid polluting game state
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Issue**: `runTests is not defined`
|
||||
**Solution**: Ensure the WASM module is properly loaded and the latest version is uploaded
|
||||
|
||||
**Issue**: Tests failing in Screeps but passing locally
|
||||
**Solution**: Check for differences between mock behavior and actual Screeps API
|
||||
|
||||
**Issue**: High CPU usage from tests
|
||||
**Solution**: Reduce test complexity or run tests less frequently
|
||||
9
douwco_hivemind/test/run_tests.js
Normal file
9
douwco_hivemind/test/run_tests.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// Screeps console command to run tests
|
||||
// Copy and paste this into the Screeps console to run all tests
|
||||
|
||||
if (typeof runTests === 'function') {
|
||||
console.log('Running Douwco Hivemind tests...');
|
||||
runTests();
|
||||
} else {
|
||||
console.log('ERROR: runTests function not found. Make sure the WASM module is loaded.');
|
||||
}
|
||||
32
js/main.js
32
js/main.js
@@ -12,3 +12,35 @@ module.exports.loop = function () {
|
||||
if (mod !== undefined)
|
||||
mod.loop();
|
||||
}
|
||||
|
||||
// Expose runTests function for console testing
|
||||
module.exports.runTests = function () {
|
||||
if (mod !== undefined && typeof mod.runTests === 'function') {
|
||||
console.log("Running Douwco Hivemind tests...");
|
||||
mod.runTests();
|
||||
|
||||
// Get and display test results
|
||||
try {
|
||||
const results = mod.getTestResults();
|
||||
const passed = mod.getPassedCount();
|
||||
const failed = mod.getFailedCount();
|
||||
const total = mod.getTotalCount();
|
||||
|
||||
console.log(results);
|
||||
console.log(`Test Summary: ${passed}/${total} passed, ${failed} failed`);
|
||||
|
||||
return `Tests completed: ${passed} passed, ${failed} failed`;
|
||||
} catch (e) {
|
||||
console.log("Tests completed. Could not retrieve detailed results:", e.message);
|
||||
return "Tests completed. Check console for basic output.";
|
||||
}
|
||||
} else {
|
||||
console.log("ERROR: runTests function not available in WASM module");
|
||||
return "ERROR: Testing framework not available";
|
||||
}
|
||||
}
|
||||
|
||||
// Also expose globally for direct console access
|
||||
if (typeof global !== 'undefined') {
|
||||
global.runTests = module.exports.runTests;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user