Skip to content

Commit

Permalink
Merge pull request #7 from SteveDunn/net6
Browse files Browse the repository at this point in the history
Net6
  • Loading branch information
SteveDunn authored Dec 12, 2021
2 parents 8b5592d + a66b4f7 commit 19691ee
Show file tree
Hide file tree
Showing 212 changed files with 8,613 additions and 8,218 deletions.
134 changes: 125 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ csharp_indent_switch_labels = true
#place else statements on a new line
csharp_new_line_before_else = true
#require members of object intializers to be on separate lines
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_members_in_object_initializers = false
#require braces to be on a new line for accessors, methods, object_collection_array_initializers, control_blocks, types, and properties (also known as "Allman" style)
csharp_new_line_before_open_brace = accessors, methods, object_collection_array_initializers, control_blocks, types, properties

#Formatting - organize using options

Expand Down Expand Up @@ -91,11 +90,11 @@ dotnet_style_object_initializer = true:suggestion
#Style - implicit and explicit types

#prefer var over explicit type in all cases, unless overridden by another code style rule
csharp_style_var_elsewhere = true:suggestion
csharp_style_var_elsewhere = false:none
#prefer var is used to declare variables with built-in system types such as int
csharp_style_var_for_built_in_types = true:suggestion
csharp_style_var_for_built_in_types = false:none
#prefer var when the type is already mentioned on the right-hand side of a declaration expression
csharp_style_var_when_type_is_apparent = true:suggestion
csharp_style_var_when_type_is_apparent = false:none

#Style - language keyword and framework type options

Expand All @@ -110,7 +109,7 @@ dotnet_style_require_accessibility_modifiers = never:suggestion
#Style - Modifier preferences

#when this rule is set to a list of modifiers, prefer the specified ordering.
csharp_preferred_modifier_order = public,protected,private,readonly,async,static,override,abstract,virtual:suggestion
csharp_preferred_modifier_order = public, private, protected, internal, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async:suggestion

#Style - qualification options

Expand Down Expand Up @@ -164,6 +163,123 @@ dotnet_diagnostic.sa1128.severity = none
dotnet_diagnostic.sa1201.severity = none

# ReSharper properties
resharper_csharp_wrap_after_declaration_lpar = true
resharper_csharp_wrap_after_invocation_lpar = true
resharper_csharp_wrap_arguments_style = chop_if_long
resharper_blank_lines_after_multiline_statements = 1
resharper_braces_for_for = not_required
resharper_braces_for_foreach = not_required
resharper_braces_for_ifelse = not_required_for_both
resharper_braces_for_while = not_required
resharper_braces_redundant = true
resharper_constructor_or_destructor_body = expression_body
resharper_csharp_wrap_parameters_style = chop_if_long
resharper_default_internal_modifier = explicit
resharper_keep_existing_declaration_block_arrangement = false
resharper_keep_existing_embedded_block_arrangement = false
resharper_keep_existing_enum_arrangement = false
resharper_method_or_operator_body = block_body
resharper_space_within_single_line_array_initializer_braces = false
resharper_use_heuristics_for_body_style = true

# Microsoft .NET properties
dotnet_naming_rule.constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.constants_rule.severity = warning
dotnet_naming_rule.constants_rule.style = upper_camel_case_style
dotnet_naming_rule.constants_rule.symbols = constants_symbols
dotnet_naming_rule.local_functions_rule.import_to_resharper = as_predefined
dotnet_naming_rule.local_functions_rule.severity = warning
dotnet_naming_rule.local_functions_rule.style = lower_camel_case_style
dotnet_naming_rule.local_functions_rule.symbols = local_functions_symbols
dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_constants_rule.severity = warning
dotnet_naming_rule.private_constants_rule.style = lower_camel_case_style_1
dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
dotnet_naming_rule.private_methods_rule.import_to_resharper = True
dotnet_naming_rule.private_methods_rule.resharper_description = private methods
dotnet_naming_rule.private_methods_rule.resharper_guid = b27820ad-5f6e-4c5d-b727-c37380d0a4cd
dotnet_naming_rule.private_methods_rule.severity = warning
dotnet_naming_rule.private_methods_rule.style = lower_camel_case_style
dotnet_naming_rule.private_methods_rule.symbols = private_methods_symbols
dotnet_naming_rule.private_static_readonly_rule.import_to_resharper = as_predefined
dotnet_naming_rule.private_static_readonly_rule.severity = warning
dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style_1
dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
dotnet_naming_rule.static_readonly_rule.import_to_resharper = as_predefined
dotnet_naming_rule.static_readonly_rule.resharper_style = AaBb, _ + aaBb
dotnet_naming_rule.static_readonly_rule.severity = warning
dotnet_naming_rule.static_readonly_rule.style = upper_camel_case_style
dotnet_naming_rule.static_readonly_rule.symbols = static_readonly_symbols
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
dotnet_naming_style.lower_camel_case_style_1.capitalization = camel_case
dotnet_naming_style.lower_camel_case_style_1.required_prefix = _
dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case
dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.constants_symbols.applicable_kinds = field
dotnet_naming_symbols.constants_symbols.required_modifiers = const
dotnet_naming_symbols.local_functions_symbols.applicable_accessibilities = *
dotnet_naming_symbols.local_functions_symbols.applicable_kinds = local_function
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
dotnet_naming_symbols.private_methods_symbols.applicable_accessibilities = local,private
dotnet_naming_symbols.private_methods_symbols.applicable_kinds = method
dotnet_naming_symbols.private_methods_symbols.resharper_applicable_kinds = method
dotnet_naming_symbols.private_methods_symbols.resharper_required_modifiers = static, instance
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly
dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
dotnet_naming_symbols.static_readonly_symbols.applicable_kinds = field
dotnet_naming_symbols.static_readonly_symbols.required_modifiers = static,readonly
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
dotnet_style_qualification_for_event = false:suggestion

# ReSharper inspection severities
resharper_arrange_constructor_or_destructor_body_highlighting = none
resharper_arrange_method_or_operator_body_highlighting = none
resharper_arrange_redundant_parentheses_highlighting = hint
resharper_arrange_this_qualifier_highlighting = hint
resharper_arrange_type_member_modifiers_highlighting = hint
resharper_arrange_type_modifiers_highlighting = hint
resharper_async_void_lambda_highlighting = suggestion
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
resharper_built_in_type_reference_style_highlighting = hint
resharper_check_namespace_highlighting = error
resharper_constant_conditional_access_qualifier_highlighting = error
resharper_convert_closure_to_method_group_highlighting = error
resharper_css_browser_compatibility_highlighting = hint
resharper_enforce_do_while_statement_braces_highlighting = none
resharper_enforce_fixed_statement_braces_highlighting = none
resharper_enforce_foreach_statement_braces_highlighting = none
resharper_enforce_for_statement_braces_highlighting = none
resharper_enforce_if_statement_braces_highlighting = none
resharper_enforce_lock_statement_braces_highlighting = none
resharper_enforce_using_statement_braces_highlighting = none
resharper_enforce_while_statement_braces_highlighting = none
resharper_field_can_be_made_read_only_local_highlighting = error
resharper_member_can_be_private_global_highlighting = warning
resharper_not_accessed_field_local_highlighting = error
resharper_redundant_base_qualifier_highlighting = warning
resharper_redundant_type_arguments_of_method_highlighting = error
resharper_remove_redundant_braces_highlighting = none
resharper_return_value_of_pure_method_is_not_used_highlighting = error
resharper_unassigned_get_only_auto_property_highlighting = error
resharper_unused_member_global_highlighting = error
resharper_unused_member_in_super_global_highlighting = warning
resharper_unused_parameter_local_highlighting = error
resharper_unused_type_global_highlighting = warning

[*.{appxmanifest,axml,build,c,c++,cc,cginc,compute,config,cp,cpp,csproj,cu,cuh,cxx,dbml,discomap,dtd,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,jsproj,lsproj,mpp,mq4,mq5,mqh,njsproj,nuspec,proj,props,proto,resw,resx,StyleCop,targets,tasks,tpp,usf,ush,vbproj,xml,xsd}]
indent_style = tab
indent_size = tab
tab_width = 4

[*.{asax,ascx,aspx,axaml,cs,cshtml,css,htm,html,js,jsx,master,paml,razor,skin,ts,tsx,vb,xaml,xamlx,xoml}]
indent_style = space
indent_size = 4
tab_width = 4

[*.{json,resjson}]
indent_style = space
indent_size = 2
tab_width = 2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"markdownlint.config": {
"MD028": false,
"MD025": {
"front_matter_title": ""
}
}
}
1 change: 1 addition & 0 deletions PacMan.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
.gitignore = .gitignore
.github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml
Directory.Build.props = Directory.Build.props
readme.md = readme.md
todo.md = todo.md
Expand Down
11 changes: 8 additions & 3 deletions PacMan.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IncludeWarningsInSwea/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeTypeMemberModifiers/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeTypeModifiers/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CheckNamespace/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConstantConditionalAccessQualifier/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ConvertClosureToMethodGroup/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CssBrowserCompatibility/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=FieldCanBeMadeReadOnly_002ELocal/@EntryIndexedValue">ERROR</s:String>
Expand All @@ -19,8 +22,9 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002ELocal/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedType_002EGlobal/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/JsInspections/LanguageLevel/@EntryValue">ECMAScript 2016</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/CONSTRUCTOR_OR_DESTRUCTOR_BODY/@EntryValue">ExpressionBody</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Implicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Explicit</s:String>
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/BLANK_LINES_AFTER_MULTILINE_STATEMENTS/@EntryValue">1</s:Int64>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
<s:String x:Key="/Default/CodeStyle/CSharpVarKeywordUsage/ForBuiltInTypes/@EntryValue">UseExplicitType</s:String>
Expand All @@ -29,7 +33,8 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=LocalFunctions/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=b27820ad_002D5f6e_002D4c5d_002Db727_002Dc37380d0a4cd/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private methods"&gt;&lt;ElementKinds&gt;&lt;Kind Name="METHOD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PublicFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=b27820ad_002D5f6e_002D4c5d_002Db727_002Dc37380d0a4cd/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private methods"&gt;&lt;ElementKinds&gt;&lt;Kind Name="METHOD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"&gt;&lt;ExtraRule Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FCONSTANT/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FVARIABLE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
Expand Down Expand Up @@ -72,7 +77,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/InlayHints/CSharpTypeNameHintsOptions/HideTypeNameHintsForTargetTypedNewExpressionsWhenEvident/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchBehaviour/=Antivirus/@EntryIndexedValue">DO_NOTHING</s:String>

<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchBehaviour/=AutoRecoverer/@EntryIndexedValue">LIVE_MONITOR</s:String>
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchBehaviour/=Format/@EntryIndexedValue">LIVE_MONITOR</s:String>
<s:String x:Key="/Default/Environment/PerformanceGuide/SwitchBehaviour/=Roslyn_002Dswea/@EntryIndexedValue">LIVE_MONITOR</s:String>
Expand Down
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
![Build](https://github.com/stevedunn/pacmanblazor/actions/workflows/build-and-test.yml/badge.svg) [![GitHub release](https://img.shields.io/github/release/stevedunn/pacmanblazor.svg)](https://GitHub.com/stevedunn/pacmanblazor/releases/) [![GitHub license](https://img.shields.io/github/license/stevedunn/pacmanblazor.svg)](https://github.com/SteveDunn/pacmanblazor/blob/main/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/Naereen/StrapDown.js.svg)](https://GitHub.com/stevedunn/pacmanblazor/issues/) [![GitHub issues-closed](https://img.shields.io/github/issues-closed/Naereen/StrapDown.js.svg)](https://GitHub.com/stevedunn/pacmanblazor/issues?q=is%3Aissue+is%3Aclosed)

<p align="center">
<img src="./assets/logo.png">
</p>


# Welcome to PACMAN written in C# and running on Blazor WebAssembly.

PLAY IT NOW! https://pacmanblazor2.azureedge.net/
Expand Down
11 changes: 5 additions & 6 deletions src/PacMan.GameComponents/ActUpdateResult.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace PacMan.GameComponents
namespace PacMan.GameComponents;

public enum ActUpdateResult
{
public enum ActUpdateResult
{
Running,
Finished
}
Running,
Finished
}
23 changes: 11 additions & 12 deletions src/PacMan.GameComponents/AttractGhost.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
using PacMan.GameComponents.Ghosts;

namespace PacMan.GameComponents
namespace PacMan.GameComponents;

public class AttractGhost : SimpleGhost
{
public class AttractGhost : SimpleGhost
public AttractGhost(GhostNickname nickName, Direction direction) : base(nickName, direction)
{
public AttractGhost(GhostNickname nickName, Direction direction) : base(nickName, direction)
{
Alive = true;
}

public void SetFrightened()
{
State = GhostState.Frightened;
}
Alive = true;
}

public bool Alive { get; set; }
public void SetFrightened()
{
State = GhostState.Frightened;
}

public bool Alive { get; set; }
}
Loading

0 comments on commit 19691ee

Please sign in to comment.