style: add .editorconfig

This commit is contained in:
snsd0805 2023-05-25 03:32:34 +08:00
parent 429d6eedea
commit 0e92289ce5
Signed by: snsd0805
GPG Key ID: 569349933C77A854
2 changed files with 52 additions and 16 deletions

36
.editorconfig Normal file
View File

@ -0,0 +1,36 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# Use 4 spaces for the Python files
[*.py]
indent_size = 4
max_line_length = 80
# The JSON files contain newlines inconsistently
[*.json]
insert_final_newline = ignore
# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = ignore
insert_final_newline = ignore
# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab
# Batch files use tabs for indentation
[*.bat]
indent_style = tab
[*.md]
trim_trailing_whitespace = false

2
main.c
View File

@ -218,7 +218,7 @@ short bot_choose_action(short *table, short *board, int state){
best_choice = rand() % ACTION_NUM; best_choice = rand() % ACTION_NUM;
} }
return best_choice; return best_choice;
} }
int main(){ int main(){