From 8c499e9904695a8f1eaffb5c3b22924d702ab592 Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Thu, 21 Mar 2024 09:11:32 -0400 Subject: [PATCH 01/10] Shifted all buttons up and added new button for Temple News --- __pycache__/Main_Board.cpython-311.pyc | Bin 9227 -> 11999 bytes __pycache__/MusicClass.cpython-311.pyc | Bin 0 -> 2992 bytes __pycache__/Player.cpython-311.pyc | Bin 5305 -> 5311 bytes __pycache__/ScoreManager.cpython-311.pyc | Bin 0 -> 3832 bytes __pycache__/SecondMenu.cpython-311.pyc | Bin 11601 -> 16960 bytes __pycache__/SharedObjects.cpython-311.pyc | Bin 0 -> 861 bytes __pycache__/computer.cpython-311.pyc | Bin 3256 -> 4030 bytes __pycache__/constants.cpython-311.pyc | Bin 788 -> 855 bytes __pycache__/game.cpython-311.pyc | Bin 4107 -> 10184 bytes __pycache__/pieces.cpython-311.pyc | Bin 2561 -> 3458 bytes main.py | 79 +++++++++++++++++----- pics/Temple.png | Bin 0 -> 571 bytes user_data/user_data.json | 2 +- 13 files changed, 64 insertions(+), 17 deletions(-) create mode 100644 __pycache__/MusicClass.cpython-311.pyc create mode 100644 __pycache__/ScoreManager.cpython-311.pyc create mode 100644 __pycache__/SharedObjects.cpython-311.pyc create mode 100644 pics/Temple.png diff --git a/__pycache__/Main_Board.cpython-311.pyc b/__pycache__/Main_Board.cpython-311.pyc index a4f5bc8df557344a8f41a3ad5083ced19622cf2a..a1aeb96a80144eb887d77429a0a75fdc51471bf7 100644 GIT binary patch delta 4087 zcmb7HYit}>6~1?OXWzER_WBXWNyc^_-oy`qLrIz@mE+WDsYr_Kig?ptjdy14iD!45 zJF{`Swb_6oHKLJ-b%T;hsbmTwDg_Z_5vjlX1H>PiVnk#K%0pDjzeTiQ^-nnG&hG54 z<03Ju{k(IZ-#Pa?=Ul(}{Kpp>?>00<2|V9=^HY6v&q`xw@f^I}A{t2%jcPuVrYQXN zo4%|+<={=`Sfd+>FiR7~?t zkYuP(h<;r)a?>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(!)~%;2NK(8@EGRbVGVPKB^iZh^k^_`wX`o9i_#M({mskisa@h-H=kX8A(!E=|NPaI K|9%gxnZ)0&w@9A= diff --git a/__pycache__/MusicClass.cpython-311.pyc b/__pycache__/MusicClass.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cf166ae97833f123631b17a6f07c1868e97cd014 GIT binary patch literal 2992 zcmb7F&2JM&6rWwMor$w11W+5&CJeL?90jLH6-8AAs3am)RU`4ygQa%0@lIgFW}VKi z5wUW}fdi#T9C}Dwamb;fAbRMrmD>Nojw}(agjA{Oft#z)3#Yy}>s_xM)2ie3n~(Qq z=FM+@Z{82NT$Vuj{HqtdkRjv`>_kOtH+B}Gu|X_SB9>yQj#5%&t(Fw7ETtmz&B#6) zko7~5PvQ}UsN@2%Qn!hvJybyh|FD$OmU@}w)3saKPpY0>KJS>GS6EriUb)U$XM`=< z4rjKr>UDqD!n*)r}| z$Ua9$isiOHvQpZeohfK+5KiFaq@-F(DP^g*NlC+#fae;>jFkpCU}fMG1Ho{QJGHN~ z3<@5mN7HsRaiqTfO*7NASh?bQwSvIs}xY_aN=eH#XuoFq>&%{<=}et0bAR4Oas z-0QFaV8?HA*DpwK$}#$IJiJHz?>vxaT~pSG0j;oD*o)90e&VJ(_iw2+Fb2C=+hv!I z)>;Cdg=KRfY9;G6vJ|iI5cYf$@2dcF09~!NA>EGvwO!kfkw|g_6}IWvH7>#G3w(cE zZ<@k37aR@*5RgbR7?w=8Sb;26{ot)r{(k0o)rd47&x8Kxc1$*SbjMx5YJ+MPz*vXbQC!d zfrg7pZVQV2EOI|wKG4v$AmwoPu_7c3kq}Jmm4>J^WWdzMda2vdAp^WM5bNY`N(P79 z^gOgh4{d7S4?UV~PM>MAvkiK#Nzc{kxo0thk8aVUo8<BWqj1>7<^(MIMBs<CJi8A{9C$y1)`}y^H*267y|DkxOr8wJxI$0(0=nn z*6ZPRhSb#F?B#t@dmNVYPJ)o|>Ld5w|K`Ah@vWg_^`T?i`ri8&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xg diff --git a/__pycache__/SharedObjects.cpython-311.pyc b/__pycache__/SharedObjects.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..abc2e002fe40e3fa761c4d1144ac6f32c8ca918a GIT binary patch literal 861 zcmZXSzi-n(6vyA$`GslPl<)^!6$z9fu}I600Tl_@5HPe1WWaKKm(2Vnm`aS7z&K0fwXNhvuPSY&BILMbgYaYi2$V6vWc8r?MjHAS3NpFGG9?M zr{WqkcZ^g#^Pm`TEEc}l?+NMlJc`3Mmdg97>vcOk9Q4S`f$%--F;|GX^;@5(ilU8` z^;gxxQ7Oxx{w zu-^#Eh0TZVqL4D|+0Uuy%CK*@)K`7RYK+pFF0xvyF<(kX+dgH)Ub-lCdl!YrK}ZIS z?(z*4TmKm1lNw?ZAru=X%EX`t3((yu+_~P*pg3AQaSqVhC^x?Op*U7R%lvrl6gE#_ za|Y!(l&4Tu^cFW__&<);6}w&e{A98_D>vrl#uQ3tP&$RJ6WE$TWe$~T(s@yx=`R+$ B?$iJP literal 0 HcmV?d00001 diff --git a/__pycache__/computer.cpython-311.pyc b/__pycache__/computer.cpython-311.pyc index 063504548907ac3716ffdc328155ef5fb704e6eb..39016aebc816e8ba9317ddbf9923f10348d01b4f 100644 GIT binary patch delta 1298 zcmah|ziSjh6yDjpy<0cA^E4JwqZup&C6`4|i(nI@!4wGrBf=q`b32pUC9^xr&RpUh zNK%M}q7b$aE73v=J7ZxX_BNI&QusGqVPPZq=6)m1M3a`2z$`OvCaVWCz4zxC9p6=?yi zO^aZUQ5&p7b9aqP$4CVkhBGI^xTRP!9k-nopW)#i&j*}gUvMh18u~XO5PO_Ri8uVf z^Kl??!elHW88je#RU|kh5orcdvzO%!s^gfGHZ*Y-gD42eV@!BcB!Tk7Ue4?SR-zY! zJ)e1NERoarKAbBS;YJ(#O2u-MY;)>X{&H(;xR5Qd=8JP{$FS!D@}JO-;+ z%w(DWPjr{t$`?^}ZqT$kyWng`0-4*tZja?Y06(AL*Z-d6shM6!bH#iIM4?u?h1gi( zP>c;Rf3lbw5doY}NHyAFm=GaL>mSZzg~3Phwy)C>>(M^ZC|Nkp+vB#uc!LI$G1 zQpiA8o5GaE%AW!q9@qP!V0e2?gyviA?4$i6^^yO?dV4S+c z;&2U<5>)J&QCP@}pum>Vbqu?d?&Ypn-GX7C+$rauBGRd6GsqxpaiW059^@glL$}1_ z;4u9gr^o1#d0=uu651awO|1u&%NoTj7(ihgmb3HMdWV`Fmi2Bj1^1cv8c3Y632tZ$ zevqdBJTx{4fJZ`bGgyba?Fp`Tpw4~-y|@8_x5Xcos~W-QA%fEJopt-1xsr!RY;_hh z7&IXphcRg1ks#uLc>^`mH_lnKlzwrZRc`5~uZB&>#?w0^FP)LSV!cji;7)59h?1Lgk# DW?hWF delta 525 zcmdldzeAF5IWI340}%YZoRRvOVufa(O9Vd~g`>LS_M{fd}?#!Q~f zvZp>d*(xTqIJKxaCOtJjFC)f3FV&?evn(~nCAB!aB)=fWEios@$iT=r#@RDi!Pv;s zOhH#6I6tkVJh3QM0jMZ5JufDpC_gJTxkT5%NH;knH8~q(TylPHL1{^9kzPS%5iig- zFu@6A6e|IJ(ZFznoo51L)8x&pddv^l1vfuqZDC~en|zu*hEEBk$R0=l6|rz`Hs@Ff zlCkGH$)^dD*#ME@;oB_1Ez88l01PM=zsa4v(vz3+w(*&Pl=MK92#HU&=IdqTntX{b zK*SL!1`5971|ac)nURt41J`5+ep63zMx_r7aKea{QSbu;oZ#aIap8m%E29iZ7M&=P H0vZYcJQ;l< diff --git a/__pycache__/constants.cpython-311.pyc b/__pycache__/constants.cpython-311.pyc index ffc1ec22d90ccd6abcf86138375259a1157077a5..f4b376bd8a08418b7d7840a5066a2e89840d8aff 100644 GIT binary patch delta 432 zcmY*Uu}%U(5S_g{j$>g#w6ZbRTEP8)vC)JNP@9eMax#mYE_Z}I3T)6;8VM%0R9K+B ze?nqqYe!*a(H=2~!Dp%iXAmZ;oh>!Gg% zx?!|ZZ-S1f(;tBG;*;)u<$WLHrte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!>4v2L#|w000Wv1wO~~A z+{LE6Tv2mX?LJ3)Vc)0!daPIhTvkPEQe!y)#= zz`pmat9k2cd9_d~X_Q9bz;?CK7iuku0Tk%B)cX3a)*ktkhd$+jZ)C$avhEzA0rof; z;wIVO!8wkw{h@vAtKK*}7uq3T64ykPW8a6C(|iib7HUqMr&uy)jwW2x3yY>$EU#!y z8L|wCuq<;eXw__`pyf3)<+KOoe8^nM=>;{5Ck%?=N=USqJqwSIngJOGPCFo$x-c+| zF90AQZXcT+JSc4S_}Q1y{v$otWr?@M|{1P*8LfVGLm$MIFXcp;FOQLjnpqNNJam0%Xl) zmQisBL^c7maTfrBW(I4B3$b6K)2@5Mz0{rBMt_oZ#ge{tPjssg-N?gL%3O2WGr_Kgn#z;u6zO%4~W;;%0P?*=g^4XmsOhg4@>6+0_J+UfIF z?FoegZTr|uk?ry??^#VIT1mpvrNSGCc*QHtwiB4O9@C?38Qc$CV*&vD7#wPd8_pn0 z$49}LdVC^eUBFpIvAuhlV>BATy9}IJa2C6D-5G-H92h-&+MYeu0HAnxg12e~vt?l3 z+EvkXJAFqv1OvCzxW6zxj rie+_K*A7ukDi)ma5kO1eIIh*j-Ws2sI>f;Zufku*d-gvYruP2;V;9CP diff --git a/__pycache__/pieces.cpython-311.pyc b/__pycache__/pieces.cpython-311.pyc index 174e8c4ffec3c162cae5dcb051011e666cdcfe01..98f14246b7872ea79bdba31d657f156d5cf6e119 100644 GIT binary patch delta 1581 zcma)5O>Y}T7@pY=e=O8VAyLwgppjC9+&Hm7ASwZZR;E!AxTQ@v>;W^`-NZ}AJJ!sm zroK3!9*{sn?jmtTssutDd*To94?w6V#Esh`l{36EW3OY{0~_V>e7?`~yze`oE`4^c z_Wh|-9)j<~FCInr%H!JV=q;FigF@t^5Qi4SJ<1 z5y?JJWV{E5_qiZFn$UwdIna0dCayQ`zKSo6zg-#sbbfRf`CeEBV(+1=nP>$g**{8xGzLi|fM1zEa4vNE?zQ=DDhqts5V}UZsNtc3{0aqGf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^beXEjPC}q9|FMY zN;S2Ual;_$J3&7Z8t^&*1*pjHxf8}sRmK{|I8MvieD!n%E7RTZ6S!ahX(ZeJ0A?AW A5&!@I diff --git a/main.py b/main.py index d7bbf32..72863b2 100644 --- a/main.py +++ b/main.py @@ -85,6 +85,8 @@ def main(): settings() elif buttons[4].collidepoint(event.pos): # if mouse is clicked on leaderboard button (not yet implemented) board_customization() + elif buttons[5].collidepoint(event.pos): + templenews(); # Check if the current song has finished, loop to next song elif event.type == SONG_END: music_loop() @@ -116,16 +118,16 @@ def menu_buttons(): startgame_icon = pygame.image.load('pics/start_icon.png') # Draw the icon next to the text with the specified size startgame_icon_resized = pygame.transform.scale(startgame_icon, icon_size) - startgame_icon_rect = startgame_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 3 + (button_height - icon_size[1] - 50) // 2)) + startgame_icon_rect = startgame_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + (button_height - icon_size[1] - 50) // 2)) color = (128, 128, 128) # grey cursor_color = (100, 100, 100) # darker grey - position = (Width // 2-150, Height // 3-25) + position = (Width // 2-150, Height // 4-25) size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) button_text = button_font.render("Start Game", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3)) + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4)) # Create button on screen using position and size parameters pygame.draw.rect(screen, color, pygame.Rect(position, size)) @@ -146,15 +148,15 @@ def menu_buttons(): # Settings Button settings_icon = pygame.image.load('pics/settings_icon.png') - position = (Width // 2 - 150, Height // 3 + button_height + spacing) + position = (Width // 2 - 150, Height // 4 + button_height + spacing) size = (300, button_height) # width, height button_text = button_font.render("Settings", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3 + button_height + spacing + button_height // 2)) + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + button_height + spacing + button_height // 2)) # Draw the icon next to the text with the specified size settings_icon_resized = pygame.transform.scale(settings_icon, icon_size) - settings_icon_rect = settings_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 3 + button_height + spacing + (button_height - icon_size[1]) // 2)) + settings_icon_rect = settings_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + button_height + spacing + (button_height - icon_size[1]) // 2)) # Create button on screen using position and size parameters pygame.draw.rect(screen, color, pygame.Rect(position, size)) @@ -177,18 +179,18 @@ def menu_buttons(): color = (128, 128, 128) # grey cursor_color = (100, 100, 100) # darker grey - position = (Width // 2-150, Height // 3 + 135) + position = (Width // 2-150, Height // 4 + 135) size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) button_text = button_font.render("Tutorial", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3+160)) + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4+160)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size tutorial_icon_resized = pygame.transform.scale(tutorial_icon, icon_size) - tutorial_icon_rect = tutorial_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 3 + 135 + (button_height - icon_size[1]) // 2)) + tutorial_icon_rect = tutorial_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 135 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) @@ -209,19 +211,19 @@ def menu_buttons(): color = (128, 128, 128) # grey cursor_color = (100, 100, 100) # darker grey - position = (Width // 2 - 150, Height // 3 + 210) # Adjust the vertical position as needed + position = (Width // 2 - 150, Height // 4 + 210) # Adjust the vertical position as needed size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) button_text = button_font.render("View Rankings", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3 + 235)) # Adjust the vertical position as needed + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 235)) # Adjust the vertical position as needed pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size leaderboard_icon_resized = pygame.transform.scale(leaderboard_icon, icon_size) leaderboard_icon_rect = leaderboard_icon_resized.get_rect( - topleft=(Width // 2 - 150 + 10, Height // 3 + 210 + (button_height - icon_size[1]) // 2)) + topleft=(Width // 2 - 150 + 10, Height // 4 + 210 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) @@ -244,18 +246,18 @@ def menu_buttons(): color = (128, 128, 128) # grey cursor_color = (100, 100, 100) # darker grey - position = (Width // 2 - 150, Height // 3 + 285) # Adjust the vertical position as needed + position = (Width // 2 - 150, Height // 4 + 285) # Adjust the vertical position as needed size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) button_text = button_font.render("Customize Board", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3 + 310)) # Adjust the vertical position as needed + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 310)) # Adjust the vertical position as needed pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size board_icon_resized = pygame.transform.scale(board_icon, icon_size) - board_icon_rect = board_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 3 + 285 + (button_height - icon_size[1]) // 2)) + board_icon_rect = board_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 285 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) @@ -271,7 +273,52 @@ def menu_buttons(): screen.blit(board_icon_resized, board_icon_rect.topleft) # Draw the icon after drawing the button screen.blit(button_text, button_text_rect) - return button_rect, button_rect_2, button_rect_3, button_rect_4, button_rect_5 + #Customize TEMPLE NEWS Button + board_icon = pygame.image.load('pics/Temple.png') + + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey + position = (Width // 2 - 150, Height // 4 + 360) # Adjust the vertical position as needed + size = (300, 50) # width, height + + button_font = pygame.font.Font(None, 32) + button_text = button_font.render("TEMPLE NEWS", True, (255, 255, 255)) # Button text and color + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 385)) # Adjust the vertical position as needed + pygame.draw.rect(screen, color, pygame.Rect(position, size)) + screen.blit(button_text, button_text_rect) + + # Draw the icon next to the text with the specified size + board_icon_resized = pygame.transform.scale(board_icon, icon_size) + board_icon_rect = board_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 360 + (button_height - icon_size[1]) // 2)) + + pygame.draw.rect(screen, color, pygame.Rect(position, size)) + screen.blit(button_text, button_text_rect) + + # Used to indicate if cursor is hovering over button. If so, button will be darker + mouse = pygame.mouse.get_pos() + button_rect_6 = pygame.Rect(position, size) + if button_rect_6.collidepoint(mouse): + pygame.draw.rect(screen, cursor_color, button_rect_6) # Change color when cursor hovered over + else: + pygame.draw.rect(screen, color, button_rect_6) # stay original color if cursor not hovering over + + screen.blit(board_icon_resized, board_icon_rect.topleft) # Draw the icon after drawing the button + screen.blit(button_text, button_text_rect) + + + return button_rect, button_rect_2, button_rect_3, button_rect_4, button_rect_5, button_rect_6 + +def templenews(): + # load image used in tutorial + checkers_icon = pygame.image.load('pics/checkersguy_icon.png') + tutorial_screen = pygame.display.set_mode([Width, Height]) + tutorial_screen.fill((128, 128, 128)) + + tutorial_font = pygame.font.Font(None, 64) + tutorial_text = tutorial_font.render("Welcome to Temple News!", True, (255, 255, 255)) + tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 50)) + tutorial_screen.blit(tutorial_text, tutorial_rect) + return 0 def tutorial(): """ diff --git a/pics/Temple.png b/pics/Temple.png new file mode 100644 index 0000000000000000000000000000000000000000..5d986743fdb517c636d0848899c57f37c101f918 GIT binary patch literal 571 zcmeAS@N?(olHy`uVBq!ia0vp^89-dY!3-odMcg@n6id3JuOkD)#(wTUiL5}rLb6AY zF9SoB8UsT^3j@P1pisjL28L1t28LG&3=CE?7#PG0=Ijcz0ZJqU_=LDVWC(u56aCz@ z{Dp1J|Ns9#^=^6-JL#2A+t1T?e%*NbL@M?3tlfV+uuY_c$YVK%C$QnM=&ON zySuRTXWR?~a@b2eeO=ifvx$ldX-?6QSPB%n;pyTSl5y|tt=oJ}3JeX2XU;g!49l9? ze(%3-baPno#EBb9fBd&@`xJX}jt0xc^Uu%9JmpoWf2SeO@q&M0LgLZ{5w5pyOcVt! zusa9-+2P`+KI>&gCf8aM|0=EJ!FT;OurU?!rS8lz7Cg0m(_B8SD_@_wtOz;G#KFOF zLN?@WXqIB(gu}l=SA>0+zxtbSi%UuB%FKU@FWUO_ zQmvAUQh^kMk%6J5u7R1Zkzt6Dp_QS9m5HIYfq|8Q!GE?15-1vS^HVa@DsgM*i`G~I P)WG2B>gTe~DWM4fr}yLc literal 0 HcmV?d00001 diff --git a/user_data/user_data.json b/user_data/user_data.json index 225923e..8c319c8 100644 --- a/user_data/user_data.json +++ b/user_data/user_data.json @@ -1 +1 @@ -{"Nate": 100, "Checkers Master": 250, "Pey": 150} \ No newline at end of file +{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50} \ No newline at end of file From 06baabbb4f2076449527c82df1cb0741519f519a Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Thu, 21 Mar 2024 09:15:31 -0400 Subject: [PATCH 02/10] New button takes you to a new page and can return to main menu --- main.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 72863b2..80baca1 100644 --- a/main.py +++ b/main.py @@ -318,7 +318,26 @@ def templenews(): tutorial_text = tutorial_font.render("Welcome to Temple News!", True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 50)) tutorial_screen.blit(tutorial_text, tutorial_rect) - return 0 + + # Exit button to return back to menu + exit_button_font = pygame.font.Font(None, 32) + exit_button_text = exit_button_font.render("Exit Tutorial", True, (255, 255, 255)) + exit_button_rect = exit_button_text.get_rect(center=(Width // 2, Height - 50)) + pygame.draw.rect(tutorial_screen, (64, 64, 64), exit_button_rect.inflate(20, 10)) + tutorial_screen.blit(exit_button_text, exit_button_rect) + + pygame.display.flip() + + while True: + for event in pygame.event.get(): + if event.type == pygame.QUIT: + pygame.quit() + return + elif event.type == pygame.MOUSEBUTTONDOWN: + if exit_button_rect.collidepoint(event.pos): # if exit tutorial button is clicked + return # exit tutorial and return to menu + elif event.type == SONG_END: + music_loop() def tutorial(): """ From cce797e5ae57dd7e93aef4108ec0549dfde0240a Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Thu, 21 Mar 2024 11:00:09 -0400 Subject: [PATCH 03/10] reddit API implemented, still needs to be formatted correctly. --- main.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 80baca1..bb45985 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ """ import pygame +import redditwarp.SYNC from SecondMenu import SecondMenu from constants import BLUE, YELLOW, RED, GREEN from ScoreManager import ScoreManager @@ -311,20 +312,31 @@ def menu_buttons(): def templenews(): # load image used in tutorial checkers_icon = pygame.image.load('pics/checkersguy_icon.png') - tutorial_screen = pygame.display.set_mode([Width, Height]) - tutorial_screen.fill((128, 128, 128)) - - tutorial_font = pygame.font.Font(None, 64) - tutorial_text = tutorial_font.render("Welcome to Temple News!", True, (255, 255, 255)) - tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 50)) - tutorial_screen.blit(tutorial_text, tutorial_rect) + temple_screen = pygame.display.set_mode([Width, Height]) + temple_screen.fill((128, 128, 128)) + # get latest from r/Temple + client = redditwarp.SYNC.Client() + m = next(client.p.subreddit.pull.top('Temple', amount=1, time='hour')) + # print(m.title) + # print(m.permalink) + + temple_font = pygame.font.Font(None, 64) + temple_text = temple_font.render(m.title, True, (255, 255, 255)) + temple_rect = temple_text.get_rect(center=(Width // 2, 50)) + temple_screen.blit(temple_text, temple_rect) + + temple_font = pygame.font.Font(None, 64) + temple_text = temple_font.render(m.permalink, True, (255, 255, 255)) + temple_rect = temple_text.get_rect(center=(Width // 2, 100)) + temple_screen.blit(temple_text, temple_rect) + # Exit button to return back to menu exit_button_font = pygame.font.Font(None, 32) - exit_button_text = exit_button_font.render("Exit Tutorial", True, (255, 255, 255)) + exit_button_text = exit_button_font.render("Exit To Menu", True, (255, 255, 255)) exit_button_rect = exit_button_text.get_rect(center=(Width // 2, Height - 50)) - pygame.draw.rect(tutorial_screen, (64, 64, 64), exit_button_rect.inflate(20, 10)) - tutorial_screen.blit(exit_button_text, exit_button_rect) + pygame.draw.rect(temple_screen, (64, 64, 64), exit_button_rect.inflate(20, 10)) + temple_screen.blit(exit_button_text, exit_button_rect) pygame.display.flip() From 9e60fc59cc0d30b32846756dca1a914ab6aa68f1 Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Thu, 21 Mar 2024 12:37:28 -0400 Subject: [PATCH 04/10] Initial implementation of top Temple reddit thread --- main.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index bb45985..1898edf 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,7 @@ """ import pygame import redditwarp.SYNC +import textwrap from SecondMenu import SecondMenu from constants import BLUE, YELLOW, RED, GREEN from ScoreManager import ScoreManager @@ -320,16 +321,33 @@ def templenews(): m = next(client.p.subreddit.pull.top('Temple', amount=1, time='hour')) # print(m.title) # print(m.permalink) + reddit_text = m.permalink; temple_font = pygame.font.Font(None, 64) temple_text = temple_font.render(m.title, True, (255, 255, 255)) temple_rect = temple_text.get_rect(center=(Width // 2, 50)) temple_screen.blit(temple_text, temple_rect) - temple_font = pygame.font.Font(None, 64) - temple_text = temple_font.render(m.permalink, True, (255, 255, 255)) - temple_rect = temple_text.get_rect(center=(Width // 2, 100)) - temple_screen.blit(temple_text, temple_rect) + # temple_font = pygame.font.Font(None, 30) + # temple_text = temple_font.render(m.permalink, True, (255, 255, 255)) + # temple_rect = temple_text.get_rect(center=(Width // 2, 100)) + # temple_screen.blit(temple_text, temple_rect) + + wraplen = 80 + my_wrap = textwrap.TextWrapper(width=wraplen) + wrap_list = my_wrap.wrap(text=reddit_text) + x = 50; + # Draw one line at a time further down the screen + for i in wrap_list: + x = x+50 + temple_font = pygame.font.Font(None, 30) + temple_text = temple_font.render(i, True, (255, 255, 255)) + temple_rect = temple_text.get_rect(center=(Width // 2, 100 + x)) + temple_screen.blit(temple_text, temple_rect) + + # Update All Window and contents + # pygame.display.update() + # Exit button to return back to menu exit_button_font = pygame.font.Font(None, 32) From 6da01b6622660f7f49ea0a1bae86c8ba83f3838a Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Thu, 21 Mar 2024 12:55:13 -0400 Subject: [PATCH 05/10] Wraps title and link text to fit page --- main.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/main.py b/main.py index 1898edf..b3afb62 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,8 @@ """ import pygame import redditwarp.SYNC +from redditwarp.models.submission_SYNC import Submission as Submission_IO +from redditwarp.models.submission import Submission import textwrap from SecondMenu import SecondMenu from constants import BLUE, YELLOW, RED, GREEN @@ -323,21 +325,27 @@ def templenews(): # print(m.permalink) reddit_text = m.permalink; - temple_font = pygame.font.Font(None, 64) - temple_text = temple_font.render(m.title, True, (255, 255, 255)) - temple_rect = temple_text.get_rect(center=(Width // 2, 50)) - temple_screen.blit(temple_text, temple_rect) - - # temple_font = pygame.font.Font(None, 30) - # temple_text = temple_font.render(m.permalink, True, (255, 255, 255)) - # temple_rect = temple_text.get_rect(center=(Width // 2, 100)) + # temple_font = pygame.font.Font(None, 64) + # temple_text = temple_font.render(m.title, True, (255, 255, 255)) + # temple_rect = temple_text.get_rect(center=(Width // 2, 50)) # temple_screen.blit(temple_text, temple_rect) - wraplen = 80 + wraplen = 35 my_wrap = textwrap.TextWrapper(width=wraplen) - wrap_list = my_wrap.wrap(text=reddit_text) + wrap_list = my_wrap.wrap(text=m.title) x = 50; # Draw one line at a time further down the screen + for i in wrap_list: + x = x+50 + temple_font = pygame.font.Font(None, 64) + temple_text = temple_font.render(i, True, (255, 255, 255)) + temple_rect = temple_text.get_rect(center=(Width // 2, 50 + x)) + temple_screen.blit(temple_text, temple_rect) + + wraplen = 70 + my_wrap = textwrap.TextWrapper(width=wraplen) + wrap_list = my_wrap.wrap(text=reddit_text) + # Draw one line at a time further down the screen for i in wrap_list: x = x+50 temple_font = pygame.font.Font(None, 30) From 01eac0824a9730499e230cf5191486e85df5aa9b Mon Sep 17 00:00:00 2001 From: Ryan Stanton Date: Fri, 22 Mar 2024 13:42:25 -0400 Subject: [PATCH 06/10] formatting --- main.py | 6 +++--- tempCodeRunnerFile.py | 2 ++ user_data/user_data.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 tempCodeRunnerFile.py diff --git a/main.py b/main.py index b3afb62..2751272 100644 --- a/main.py +++ b/main.py @@ -5,8 +5,8 @@ """ import pygame import redditwarp.SYNC -from redditwarp.models.submission_SYNC import Submission as Submission_IO -from redditwarp.models.submission import Submission +# from redditwarp.models.submission_SYNC import Submission as Submission_IO +# from redditwarp.models.submission import Submission import textwrap from SecondMenu import SecondMenu from constants import BLUE, YELLOW, RED, GREEN @@ -320,7 +320,7 @@ def templenews(): # get latest from r/Temple client = redditwarp.SYNC.Client() - m = next(client.p.subreddit.pull.top('Temple', amount=1, time='hour')) + m = next(client.p.subreddit.pull.top('Temple', amount=1, time='month')) # print(m.title) # print(m.permalink) reddit_text = m.permalink; diff --git a/tempCodeRunnerFile.py b/tempCodeRunnerFile.py new file mode 100644 index 0000000..6d11514 --- /dev/null +++ b/tempCodeRunnerFile.py @@ -0,0 +1,2 @@ +from redditwarp.models.submission_SYNC import Submission as Submission_IO +# from redditwarp.models.submission import Submission \ No newline at end of file diff --git a/user_data/user_data.json b/user_data/user_data.json index 8c319c8..b77c7b3 100644 --- a/user_data/user_data.json +++ b/user_data/user_data.json @@ -1 +1 @@ -{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50} \ No newline at end of file +{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50, "ryan": 0} \ No newline at end of file From a0e83f13beba9d62c7068080423a0960e11372ee Mon Sep 17 00:00:00 2001 From: Matt-Littlefield Date: Tue, 26 Mar 2024 13:32:09 -0400 Subject: [PATCH 07/10] added user piece customization, functionality to be added shortly --- .idea/.gitignore | 3 ++ .idea/bassill-lee-stanton-littlefield.iml | 9 ++++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 +++ __pycache__/Main_Board.cpython-312.pyc | Bin 0 -> 11304 bytes __pycache__/MusicClass.cpython-312.pyc | Bin 0 -> 2905 bytes __pycache__/Player.cpython-312.pyc | Bin 0 -> 5004 bytes __pycache__/ScoreManager.cpython-312.pyc | Bin 0 -> 3511 bytes __pycache__/SecondMenu.cpython-312.pyc | Bin 0 -> 15546 bytes __pycache__/SharedObjects.cpython-312.pyc | Bin 0 -> 794 bytes __pycache__/computer.cpython-312.pyc | Bin 0 -> 3683 bytes __pycache__/constants.cpython-312.pyc | Bin 0 -> 845 bytes __pycache__/game.cpython-312.pyc | Bin 0 -> 9912 bytes __pycache__/pieces.cpython-312.pyc | Bin 0 -> 3341 bytes main.py | 59 +++++++++++++++++----- user_data/user_data.json | 2 +- 17 files changed, 79 insertions(+), 14 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/bassill-lee-stanton-littlefield.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 __pycache__/Main_Board.cpython-312.pyc create mode 100644 __pycache__/MusicClass.cpython-312.pyc create mode 100644 __pycache__/Player.cpython-312.pyc create mode 100644 __pycache__/ScoreManager.cpython-312.pyc create mode 100644 __pycache__/SecondMenu.cpython-312.pyc create mode 100644 __pycache__/SharedObjects.cpython-312.pyc create mode 100644 __pycache__/computer.cpython-312.pyc create mode 100644 __pycache__/constants.cpython-312.pyc create mode 100644 __pycache__/game.cpython-312.pyc create mode 100644 __pycache__/pieces.cpython-312.pyc diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/bassill-lee-stanton-littlefield.iml b/.idea/bassill-lee-stanton-littlefield.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/bassill-lee-stanton-littlefield.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..0bbcf41 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d7d145b --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/__pycache__/Main_Board.cpython-312.pyc b/__pycache__/Main_Board.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b3bd245bac523539824ebdd0cfb2656ce6062b7c GIT binary patch literal 11304 zcmcIqYit`=cAnwPP$WgYOzIgwMwS$tvMk4sIE}rrBTI7DPsNcPCCX+Qnlq9qQKURW z#g;P828$GsQUjKfG@^G6gjxi!j0C9Mq=13uhtfZB&;k`Lx#F^3thXB!Fwh@*6ljq@ z?K$^y9;7I{ZMGNo)qR}%n0wFp&g1g$i;7$fq`wxpo|Y{P^GB@ciO&>PUxvaYBQf2K z#7ed>+s(pXE^Hg%y14=KN1ZnQuE-j>+A(tG+V@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QAY2TD3p@7R9=S7c x`{ZKaIL<=)yZO@Ql1C_dgoPhnhXi=h(>Lt|i*MXG?fVaZisOQh2tvl!{{Sf>c@O{q literal 0 HcmV?d00001 diff --git a/__pycache__/ScoreManager.cpython-312.pyc b/__pycache__/ScoreManager.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86123520e950fc6a3c31b2d21109d88ca4d89a26 GIT binary patch literal 3511 zcmb_eO>7&-6`t82iKHl-k|{;DTx(S+ZWvco)Y@@?stttNDqJLVTPH!S%VNV>TB|H~ znc1af5(=EQKGnu~9?RKS4SL*JX- z6@Mb5XpkZI?aX^KZ|3d$-h1=6{{9q!M$P}2r;~*I69;iqqR!4s&}k4x76_wEvgrba zw`@ygX+feyB0nNbxk8wFTMAb!$Tca~Q~yQkT+!v`>xN@oFnPXGOTDpZYVAC2-m*4J4Pp{7i!4ZtF33!}LKYMz169$qg&w8??PWbc6Sdx4 zB1pH}QE#L)XkRifG~p{9{@a@2Fs!c^?b@a)VAgIDMZ(S-oX3Ryx~SGygJVdk!;8qG=d%R+r@wB=a- z?h!Q{S%z)Z!6VP|s^u?ghE@XiJ4U&6_;5kw%@TLZLcx;fI$~~U6z*Ec$w4As9`vE% zdblj;!%q_pa#Emprd{H_V2Fn%Xxh`l^qctcrpt!!+ZH@#$uey=eaiIS@!iVw+kiXE zwx?{dFEO$Ma#D;jiGv<^guDI<4N(j?(3 zB^D`4=RxB#2{q*8dZ`0CZJui(2$}x_3Igxk^s5|W0&+*_{T4z3$_u%kKyfRkBitV- zh@(J3<-q`Eo`UPoyH$ss=G^7M{vV$^TR3GFU1kc#Es3LHfr2oLu*3U+!|@x`M>>4n zW=0mI-kU(s-AZ!!{=m=;)+n!**UxPXDYJjo`r<8P~tR_7RWq^^_J22uI7tJW3 zTNpuRyXP@6A`bRQ76Dx@@xb5nT3t zAn%iZCCI+P8U*_}x%^ml~G zAIWhFfB;v&Bv(4+P|ttW;gq-twLAhGs7RtR#m-nXyv4Fn(U!w}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|8zBvdSGZ15fnF^ri#4Cq84R zsqX2!I)HK$Skb$Iy8$10uR!A;hr0&{dMzwy{Oc6{M=T~&gSJ+Ay_3a-`w94km{Pm=#G#^m*@-dgb*%;Cw+u?X;_J+KY2bB8()$o97dq8ag?_*`%2jw%SnM)aG?e)I-zO=Jd zbha+Mn{;kZP!7mUJ2!~V4QZ!Wbb?QC&%HDE2f_d9JdUN{@@u-5)REdO? zpFoS~AU}nM2vE>bQqd(uG!X^6PJ%HfvC{3$doyo#XJ+5mYA)zS@E1O}0KOS;wd_md z?434VK?EK|B(gY(Ezcsxwz=)u7N9+-T#2Ut!%LGG|KyaZ&sc-`S!~c$(}$?^hIo$7 zZlQBXE@HhhmIsah>Be?*Zg=QD-3bInTipSMO187HyS;;ShNL~lkupg~5+kZo8VU>) z(tyf|ma;^uAPJGCJ*u?&eh?1(A{`~sqmg7G4S67C+x>2C(W(=>YvXQm_PTb*YTh3v$EQk>}z zdklHhd5ChT(yY_fCo|4l9I<5@tI~Y(mJX zWs}lR7s!pTP&;veRQH^Nh5dz>6Hq>=?pKeYaRiM|u>8Y;Yr@)FJaypu>g&yq%WEH? S{srpCuyO<|pJ7$hblTsG;@Z&w literal 0 HcmV?d00001 diff --git a/__pycache__/computer.cpython-312.pyc b/__pycache__/computer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1126ba135c145878f61005525fddc37bcea9dd5 GIT binary patch literal 3683 zcmb7HO>7&-6`uVgmy~FlvP_GN+pJ=#4kc1*gY*Zk>q4>Q#ImC_ty2d=T4Kc=kxMPP z#O~4(g=JwE1wsP`EF(arq8IiiLjj_m>YnOjfdYkCDiymG&;rfHH(5q6L4fwnESI7c z0&WN3?Aw_)@4cD*-Zzhb3Wb6Q8iT*Ue+KDa6&6nR`+;DlTA}v&Z(K4q?(d}&5~X;)dkRA)D5X17v-#4%+f`fwsEPX z$rbPsd|NH51$jl1wXANaR<1zTOkI^Mo$5%L9L_9Z!<>+A!n}ox(n3YbSysusFgcl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kHl3 zMtr;(PaPs5FmiXcHoZ3TS!}pI`s?E#9t9sy|8b-_^iJ(+t3Pu8`rYdru}}NYJ?#Tq2Lkv!7(o4zUa8S3oj#zcVKY7X zi1h#hiNo~d9+W3H*0JWTVvt36kG8y5L3;!6>9v^M+(KTy*<-tllw)x&CHy_^I#=pz{ zHoKF&^q74-waZ^=@!}pIYw)p+@xAz1BROC_7-2uli%u`li_4ljyK6_SO zq5TC{pE!6cAqh%IMhcOkj8v!~09B+xfOM!K1L`OT4U~sDWIk6U3Fe`R3b26Y(%l@i zuspbzS>SK1k#t%CHBWI zzPrajV|TB~z}9ZP$qLP9?Tv=pY1W|2`)lP^mFZQtR;jjFK90PA_QGh$G}`qDKgS<> zearv}J;cCvZKv{4y5e_|uD6{w#SwLeUK|sjf4Jvkf}Ap@hjBP^UU-!Hgsc&a*V6HY z!P>vNn<4V4UgsVULv%#&lgQ@Y;#Z(AdHSKsviws~WpHIm^896PG0`TuWuElKM4cFS z5->?QV~L~u-9(>Qi>GD+5;U1#ND7mMl~XIxl2@08bzv-zjpYktb!@D@>wO^a$wko_ W7oD$<%I8J*^Xqft=_!bc{M0`tEY0Kq literal 0 HcmV?d00001 diff --git a/__pycache__/game.cpython-312.pyc b/__pycache__/game.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..333e8c2c24b767fd0b02f91ca303d60c9ba737ed GIT binary patch literal 9912 zcmcgyU2GdycAg=J;)tX~+WNI5OQRplqAkm?;`Q2cyj@3<9V?EUu9c)#vmq$XNFqg% z>deS8X}P-(d5{)aC|+zUdAAG84_h|!4l$cq@sATvbkvB$xUPx!|@0ok=eCOw$%TKGSd<-O3`X9;L#4!Jc1tW2KX75$VtTG}q z&WNn&O0wfDJl#pxtb5!&%Z+oho^j7?#drma?Of73>mB#9jElLAIuKYjD!cZMU^uZ$0eS9q?G?nhGM9{I%$8m1? z6&B*DlqB~GijGXmSy%~)sqqu%-1kSPPXljab#<|lOPDv`6 zv;Hnb2IZ9!E?%M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{ z;qgZ)s+dZI9Ug=_JP37yKuqcg=qiUBbGUIwL}$w&DV52f7@m$O%V-!` zF4mvK;7WS)I3D;OkV*1PBn_J`30K6$jc>B9u^GDPV#8+WB8%}2(1pBCtevX6Tz56L z0<0wKI~peFSO$wLFqkGbP`80IeF%7KgcQNql|3p~ggr(0T@9GZe~=NX@OqR;yv;LgXL71V!)5fbBbdJ+KT!K=PV4!P%@_;xb6a zP+Zes74=-x`U05e2GG}Q8bbJP`5qkkKQ{uo=)5)UzuvBL2jFa2BMheW^9gQX)645N zI+V5bPqa6C{|B1AQKk1XbUB>CwjgC4`&CJ4sc?Ivm! zgv*7JC2kf8j?fD!m|_WYBK?{zkLs$ObD}uRX?lOoPVg)%IQ*zya6(j3^1*-gayIZ0k&GDW1F(dMegW)m*OmRctPa&DY<#E!?ta zM`lLu*!M=}MizGNn-Bfi@TlcsOR3|;6EU@B_bp*IIupH#J2{a^hW zNP(X*%ejRC^M2X!mDN>VcLcns=XMzrieVc3&|Pe4!KUS=VDSCrdLg)ZxmFBjxRr)bu*sE#{E0B#1DzA`pPg>) zWKo4)rdSKvQM46DSlHMdUWf->r9PlZSi_2Hy#?eM&v6{wg%h4f370I9w% Date: Tue, 26 Mar 2024 13:39:02 -0400 Subject: [PATCH 08/10] user piece customization menu added, functionality to be added shortly --- __pycache__/Main_Board.cpython-312.pyc | Bin 11304 -> 11304 bytes __pycache__/SecondMenu.cpython-312.pyc | Bin 15546 -> 15546 bytes __pycache__/game.cpython-312.pyc | Bin 9912 -> 9912 bytes 3 files changed, 0 insertions(+), 0 deletions(-) diff --git a/__pycache__/Main_Board.cpython-312.pyc b/__pycache__/Main_Board.cpython-312.pyc index b3bd245bac523539824ebdd0cfb2656ce6062b7c..c2c73aafc2c957812e326e3fe0cfac4ea0a9a46d 100644 GIT binary patch delta 19 ZcmZ1xu_A)&G%qg~0}#k_Y~+&D0RS}e1SS9g delta 19 ZcmZ1xu_A)&G%qg~0}yOt-N+@U0{}Qx1hxPG diff --git a/__pycache__/SecondMenu.cpython-312.pyc b/__pycache__/SecondMenu.cpython-312.pyc index 8b3692be246b58e59428495cfcfa36ee73d2c2b9..4fa0b8bd8723959c695e761ae72a2143fa03dbe1 100644 GIT binary patch delta 19 Zcmdm0xvP@vG%qg~0}zODY~ Date: Thu, 28 Mar 2024 19:58:42 -0400 Subject: [PATCH 09/10] checkers change color --- Main_Board.py | 15 ++++++++------- SecondMenu.py | 7 ++++--- __pycache__/Main_Board.cpython-312.pyc | Bin 11304 -> 11443 bytes __pycache__/SecondMenu.cpython-312.pyc | Bin 15546 -> 15663 bytes __pycache__/computer.cpython-312.pyc | Bin 3683 -> 3691 bytes __pycache__/game.cpython-312.pyc | Bin 9912 -> 10070 bytes computer.py | 8 ++++---- game.py | 17 +++++++++-------- main.py | 10 +++++++++- user_data/user_data.json | 2 +- 10 files changed, 35 insertions(+), 24 deletions(-) diff --git a/Main_Board.py b/Main_Board.py index b6dcd70..aae6e4f 100644 --- a/Main_Board.py +++ b/Main_Board.py @@ -4,7 +4,7 @@ """ import pygame -from constants import BLACK, ROWS, RED, SQUARE_SIZE, COLS, WHITE +from constants import BLACK, ROWS, RED, SQUARE_SIZE, COLS, WHITE, GREEN from pieces import Piece class Main_Board: @@ -13,12 +13,13 @@ class Main_Board: evaluate the board, get all pieces, get a single piece, move a piece (left or right), create the board, draw the board, remove a piece, and check for a winner. """ - def __init__(self, color): + def __init__(self, color, user_color): """ The init function initializes the Main_Board class with a color and creates the board. """ self.board = [] self.color = color + self.user_color = user_color self.red_left = self.white_left = 12 self.red_kings = self.white_kings = 0 self.create_board() @@ -82,7 +83,7 @@ def create_board(self): if row < 3: self.board[row].append(Piece(row, col, WHITE)) elif row > 4: - self.board[row].append(Piece(row, col, RED)) + self.board[row].append(Piece(row, col, self.user_color)) else: self.board[row].append(0) else: @@ -106,7 +107,7 @@ def remove(self, pieces): for piece in pieces: self.board[piece.row][piece.col] = 0 if piece != 0: - if piece.color == RED: + if piece.color == self.user_color: self.red_left -= 1 else: self.white_left -= 1 @@ -116,10 +117,10 @@ def winner(self): The winner function checks if a winner has been found and returns the winner. If no winner has been found, None is returned. If a user has no pieces left or no moves left, the other user is the winner. """ - if self.red_left <= 0 or self.no_moves(RED): + if self.red_left <= 0 or self.no_moves(self.user_color): return WHITE elif self.white_left <= 0 or self.no_moves(WHITE): - return RED + return self.user_color return None @@ -131,7 +132,7 @@ def get_valid_moves(self, piece): left = piece.col - 1 right = piece.col + 1 row = piece.row - if piece.color == RED or piece.king: + if piece.color == self.user_color or piece.king: moves.update(self.move_left(row -1, max(row-3, -1), -1, piece.color, left)) moves.update(self.move_right(row -1, max(row-3, -1), -1, piece.color, right)) if piece.color == WHITE or piece.king: diff --git a/SecondMenu.py b/SecondMenu.py index efe27dc..1a51a77 100644 --- a/SecondMenu.py +++ b/SecondMenu.py @@ -46,6 +46,7 @@ def __init__(self, track): self.background_music = BackgroundMusic([track]) color = RED + user_color = RED def start_game_menu(self): """ The start game menu function displays the second menu of the game, which allows the user to choose between playing against another player or against the computer. @@ -193,7 +194,7 @@ def start_game_vs_player(self, screen): """ run = True clock = pygame.time.Clock() - game = Game(screen, self.color, player1_name.username, player2_name.username) + game = Game(screen, self.color, self.user_color, player1_name.username, player2_name.username) global score_manager, user_scores # Exit Button @@ -240,7 +241,7 @@ def start_game_vs_computer(self, screen): """ run = True clock = pygame.time.Clock() - game = Game(screen, self.color, player1_name.username, "Computer") + game = Game(screen, self.color, self.user_color, player1_name.username, "Computer") global score_manager, user_scores # Exit Button @@ -254,7 +255,7 @@ def start_game_vs_computer(self, screen): while run: clock.tick(60) if game.turn == WHITE: - value, new_board = minimax(game.get_board(), 4, WHITE, game) + value, new_board = minimax(game.get_board(), 4, WHITE, game, self.user_color) game.ai_move(new_board) if game.winner() != None: diff --git a/__pycache__/Main_Board.cpython-312.pyc b/__pycache__/Main_Board.cpython-312.pyc index b3bd245bac523539824ebdd0cfb2656ce6062b7c..18c884402ccef1d31dc4f332f8162a12ebbb11a2 100644 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&Z@hp%wox!svTE^9lr^&`=V?jp`w7uwf_UXKAeC6 diff --git a/computer.py b/computer.py index c54ff82..79b80c4 100644 --- a/computer.py +++ b/computer.py @@ -9,7 +9,7 @@ import pygame from constants import RED, WHITE -def minimax(position, depth, max_player, game): +def minimax(position, depth, max_player, game, user_color): """ The minimax function is the minimax algorithm for AI to play checkers, and has parameters position, depth, max_player, and game parameters. The function returns the best move for the computer to make. @@ -22,7 +22,7 @@ def minimax(position, depth, max_player, game): maxEval = float('-inf') best_move = None for move in get_all_moves(position, WHITE, game): - evaluation = minimax(move, depth-1, False, game)[0] + evaluation = minimax(move, depth-1, False, game, user_color)[0] maxEval = max(maxEval, evaluation) if maxEval == evaluation: best_move = move @@ -31,8 +31,8 @@ def minimax(position, depth, max_player, game): else: minEval = float('inf') best_move = None - for move in get_all_moves(position, RED, game): - evaluation = minimax(move, depth-1, True, game)[0] + for move in get_all_moves(position, user_color, game): + evaluation = minimax(move, depth-1, True, game, user_color)[0] minEval = min(minEval, evaluation) if minEval == evaluation: best_move = move diff --git a/game.py b/game.py index af2a738..600523e 100644 --- a/game.py +++ b/game.py @@ -3,7 +3,7 @@ The game file holds the game logic and game class. """ import pygame -from constants import RED, WHITE, YELLOW, SQUARE_SIZE +from constants import RED, WHITE, YELLOW, SQUARE_SIZE, GREEN from Main_Board import Main_Board class Game: @@ -12,7 +12,7 @@ class Game: display the piece count, display the player names, update the board, check for a winner, select a piece, move a piece, show available moves, change the turn, get the board, and move an AI piece. """ - def __init__(self, win, color, player1, player2): + def __init__(self, win, color, user_color, player1, player2): """ The init function initializes the Game class with a window, color, player1, and player2, and sets the turn start time and turn timeout. The text color is set to white, and the urgent text color is set to red. The screen is set to the window size, and the player names are set to player1 and player2. @@ -21,9 +21,10 @@ def __init__(self, win, color, player1, player2): self.turn_timeout = 5200 # 5.2 seconds per turn self.win = win self.color = color + self.user_color = user_color self.selected = None - self.board = Main_Board(self.color) - self.turn = RED + self.board = Main_Board(self.color, self.user_color) + self.turn = user_color self.valid_moves = {} self.font = pygame.font.Font(None, 36) # Font for rendering text self.text_color = WHITE # Text color @@ -53,8 +54,8 @@ def display_turn(self): """ The display turn function displays the current turn on the screen. """ - if self.turn == RED: - text = f"Current Turn: RED" + if self.turn == self.user_color: + text = f"Current Turn: {self.user_color}" else: text = f"Current Turn: WHITE" text_surface = self.font.render(text, True, self.text_color) @@ -151,10 +152,10 @@ def change_turn(self): """ self.valid_moves = {} self.turn_start_time = pygame.time.get_ticks() # Reset the turn timer - if self.turn == RED: + if self.turn == self.user_color: self.turn = WHITE else: - self.turn = RED + self.turn = self.user_color def get_board(self): """ diff --git a/main.py b/main.py index ceb56f1..e9f3681 100644 --- a/main.py +++ b/main.py @@ -649,7 +649,7 @@ def board_customization(): # User Checker Color Text user_checker_font = pygame.font.Font(None, 32) - user_checker_text = user_checker_font.render("User Checker Color", True, (255, 255, 255)) + user_checker_text = user_checker_font.render("Player One Checker Color", True, (255, 255, 255)) user_checker_rect = user_checker_text.get_rect(center=(Width // 2 - 240, Height // 3 + 150)) # Enlarge the box behind the text user_checker_box_width = user_checker_rect.width + 40 # Increase width @@ -693,6 +693,14 @@ def board_customization(): second_menu_instance.color = YELLOW if board_green_square_rect.collidepoint(event.pos): # make board green second_menu_instance.color = GREEN + if user_red_square_rect.collidepoint(event.pos): # make user red + second_menu_instance.user_color = RED + if user_blue_square_rect.collidepoint(event.pos): # make user blue + second_menu_instance.user_color = BLUE + if user_yellow_square_rect.collidepoint(event.pos): # make user yellow + second_menu_instance.user_color = YELLOW + if user_green_square_rect.collidepoint(event.pos): # make user green + second_menu_instance.user_color = GREEN elif event.type == SONG_END: music_loop() diff --git a/user_data/user_data.json b/user_data/user_data.json index 7cce579..22f6fba 100644 --- a/user_data/user_data.json +++ b/user_data/user_data.json @@ -1 +1 @@ -{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50, "ryan": 0, "matt": 0} \ No newline at end of file +{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50, "ryan": 0, "matt": 100, "matt2": 0} \ No newline at end of file From 7080e727cb93d5d637fe8d5db0de3b03aae39095 Mon Sep 17 00:00:00 2001 From: Matt-Littlefield Date: Thu, 28 Mar 2024 21:07:04 -0400 Subject: [PATCH 10/10] added player 2 color change and fixed rankings issue --- Main_Board.py | 13 +- SecondMenu.py | 13 +- __pycache__/Main_Board.cpython-312.pyc | Bin 11443 -> 11578 bytes __pycache__/SecondMenu.cpython-312.pyc | Bin 15663 -> 15858 bytes __pycache__/computer.cpython-312.pyc | Bin 3691 -> 3705 bytes __pycache__/game.cpython-312.pyc | Bin 10070 -> 10113 bytes computer.py | 8 +- game.py | 11 +- main.py | 324 ++++++++++++++++--------- user_data/user_data.json | 2 +- 10 files changed, 241 insertions(+), 130 deletions(-) diff --git a/Main_Board.py b/Main_Board.py index aae6e4f..7c806e9 100644 --- a/Main_Board.py +++ b/Main_Board.py @@ -13,13 +13,14 @@ class Main_Board: evaluate the board, get all pieces, get a single piece, move a piece (left or right), create the board, draw the board, remove a piece, and check for a winner. """ - def __init__(self, color, user_color): + def __init__(self, color, user_color, user_two_color): """ The init function initializes the Main_Board class with a color and creates the board. """ self.board = [] self.color = color self.user_color = user_color + self.user_two_color = user_two_color self.red_left = self.white_left = 12 self.red_kings = self.white_kings = 0 self.create_board() @@ -58,7 +59,7 @@ def move(self, piece, row, col): piece.move(row, col) if row == ROWS - 1 or row == 0: piece.make_king() - if piece.color == WHITE: + if piece.color == self.user_two_color: self.white_kings += 1 else: self.red_kings += 1 @@ -81,7 +82,7 @@ def create_board(self): for col in range(COLS): if col % 2 == ((row + 1) % 2): if row < 3: - self.board[row].append(Piece(row, col, WHITE)) + self.board[row].append(Piece(row, col, self.user_two_color)) elif row > 4: self.board[row].append(Piece(row, col, self.user_color)) else: @@ -118,8 +119,8 @@ def winner(self): If a user has no pieces left or no moves left, the other user is the winner. """ if self.red_left <= 0 or self.no_moves(self.user_color): - return WHITE - elif self.white_left <= 0 or self.no_moves(WHITE): + return self.user_two_color + elif self.white_left <= 0 or self.no_moves(self.user_two_color): return self.user_color return None @@ -135,7 +136,7 @@ def get_valid_moves(self, piece): if piece.color == self.user_color or piece.king: moves.update(self.move_left(row -1, max(row-3, -1), -1, piece.color, left)) moves.update(self.move_right(row -1, max(row-3, -1), -1, piece.color, right)) - if piece.color == WHITE or piece.king: + if piece.color == self.user_two_color or piece.king: moves.update(self.move_left(row +1, min(row+3, ROWS), 1, piece.color, left)) moves.update(self.move_right(row +1, min(row+3, ROWS), 1, piece.color, right)) diff --git a/SecondMenu.py b/SecondMenu.py index 1a51a77..e266e2c 100644 --- a/SecondMenu.py +++ b/SecondMenu.py @@ -47,6 +47,7 @@ def __init__(self, track): color = RED user_color = RED + user_two_color = WHITE def start_game_menu(self): """ The start game menu function displays the second menu of the game, which allows the user to choose between playing against another player or against the computer. @@ -194,7 +195,7 @@ def start_game_vs_player(self, screen): """ run = True clock = pygame.time.Clock() - game = Game(screen, self.color, self.user_color, player1_name.username, player2_name.username) + game = Game(screen, self.color, self.user_color, self.user_two_color, player1_name.username, player2_name.username) global score_manager, user_scores # Exit Button @@ -210,12 +211,12 @@ def start_game_vs_player(self, screen): if game.winner() != None: print(game.winner()) run = False - if game.winner() == RED: + if game.winner() == self.user_color: player1_name.update_win() score_manager.update_scores(player1_name) player2_name.update_loss() score_manager.update_scores(player2_name) - elif game.winner() == WHITE: + elif game.winner() == self.user_two_color: player2_name.update_win() score_manager.update_scores(player2_name) player1_name.update_loss() @@ -241,7 +242,7 @@ def start_game_vs_computer(self, screen): """ run = True clock = pygame.time.Clock() - game = Game(screen, self.color, self.user_color, player1_name.username, "Computer") + game = Game(screen, self.color, self.user_color, self.user_two_color, player1_name.username, "Computer") global score_manager, user_scores # Exit Button @@ -254,8 +255,8 @@ def start_game_vs_computer(self, screen): while run: clock.tick(60) - if game.turn == WHITE: - value, new_board = minimax(game.get_board(), 4, WHITE, game, self.user_color) + if game.turn == self.user_two_color: + value, new_board = minimax(game.get_board(), 4, self.user_two_color, game, self.user_color, self.user_two_color) game.ai_move(new_board) if game.winner() != None: diff --git a/__pycache__/Main_Board.cpython-312.pyc b/__pycache__/Main_Board.cpython-312.pyc index 18c884402ccef1d31dc4f332f8162a12ebbb11a2..92a4aabd9c5dda4fe86484ecaccd563a5664e728 100644 GIT binary patch delta 1975 zcma)6T}+!*818Am{z2&v1zOtDmVZ8ehXY)qzyyK00h??K`w2D;Ezkjloe#t@%ocW` zOO`D7YKGCosTT{$qF`e*#$?&;mMjA|nP0q^Udhcun0ldE=KG#Pi-{MWq)*Rz&wJkA z=lv2VzdL2Uo0XNJ!F4FxFtjhYV*Op4C((I(>F}R^Pu~Z(uC8THH>U~FS*!?qi{Uw? zk9&RUPAl#VJ7>Hz!lu^`S1lRviEfse!6SLi)@dcmLsK&oP%E|jBvn$PV?*4IuegIC z8$lrlL3l@+W(VP!RABU1zbid3c@z2iCycqlWc0CoC^c3x9~?2BW8TCaqnQ=u(0eCA z9zia`660?CQy4;!=ffYSB324+b1U=0az%dPtl7n6(hw1-hRIlTFskqpl&JdTff5YT z!sja)wX6yrXPgXpQ978a10HBE>UIx(T?4x%keJD2j2(w_mL}_*=8P2;wpU`s;$;`e z2`@!ZrSXY3qns?L=JD`oG&CBE4<~Cvtt}qdO343vhJ^6_1CZ2>ftAADOTmV^^RKk=@%&~}WR10B82eZHpM=AF3wBszh zL~7?99(d-+VxR3g=xo$WJplY9*doWs^{r`B8hR$Kdis5|=5eGINR!`pN)<`l3u%IHnn zoA4oA7UG4hPj;Y~lu{)U4N-P6g>FgxUww%1@XP?r=SGpRzva%e4$8DwHgaJ-Z7e+u zg3Lr~S(kKMO@^ua=?vjZm!FNmJ=d8eDUp7uMP;Dh)1MKDlrD(7n{5`PV`@${8u-Fp z4%2QAG&~)OXW4yA*`qAS)zIb8b+(pOc>UOoflmjP8`k%BuI}x8P}+rx*IE}^?^}u< z+nij?nHFBL=di8BEzj3X!q~H+$y=BB$T!biR6_nD!p3u4vPBFOFM$UCzWp>is%|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vr| z4bPT9TM*h24k6&H!3UOhqSTFmkq$Jh3%1(=r!J5s+8mYaQqA>h*57=*68TJ>0J4it vq8w#g&G*QBTKS8GXY>RDH^qAVY3rKLWtQfY9(t0QT4eX5BJo`p5V_Ic&^wgs diff --git a/__pycache__/SecondMenu.cpython-312.pyc b/__pycache__/SecondMenu.cpython-312.pyc index e2ade85bbc00a9903335d86dd57daa206096cfdc..679a1e044838dd5f914acba1c28dc039bfcfd513 100644 GIT binary patch delta 1241 zcmah}T}%^M6rMYsj{R?Khf-^y7?znjwH8VhYHNeWYL+EsUE{`u2i-W`#E}3FgCs4) zs`!JVBF6`##z0KgAL1I)7qk1qi-}ozXklYrvJd-ce9;9TeA?Z6!IrqLagzJpbI&>V zyJznCW*(&%Gv;Szvw_0T&kpv7U#HEA7KI_J^*U3!4!xuqraBA~gV88yF`9DI+9xj5 zm>Z~m%Nlfen+A`i1JGYLi<410a6V!BpL~1aV7+aelK41Nk%p*SIg zq^Mt6LzC!&OQH$-MF*%(4rXxX9+(xY(3kK^to6o96|T-|Ysr?|Fxz_LSLJmQzVX+g zz0eY>W)*sj9(BMi|03E5S2pM|pli$fF4JeY#j`iWh4+b7%S9F1@+ z*Z_xuCgX%uGFK77zL%>Kvwv1%j6_edP|rtUdxH%!Jg3!4NMhj{?>Dbm7L0CL zFdn$wAixqY!fTut5DsaO@(+v&l~ASEdk}@2Czh^bbuM+1R=$P@A<^=o*x`Ao<`eqI zHN6Y{Vk~!8j^MlXz(S+9vg}(`Rd)cZ!4^&+OYYn7?+E>!tKaHI=p^iJN*GSzauyi1 zU+IP$O>XaLyi|q>kdI0^L!gboSpw%^cfe08=f|79-Vx%sK;R;QQ35>#E)lp4@#Z7! zYi#y~NfVv_ZDKyvGjHw1?YkYjzN_d77CgZ@Yw(X+@m}~*{C<4iAAP)chAFn}E41v( z@Bc2}d9c_i7dqv9S8uWFM4{`%5=DKngU;QHco8zg(``Fh^6OAe0vio%sK@3o^%t$t z>J|;OHu6SCnQhs`i?v*~^+km{n}qgg4Y~on(GVJiJ5d>pfF%|{Hz5{tp-I>uduBbZ NLGDG0pt26r{R?deEMEWs delta 1257 zcmaJPK6Iv8vP2V`sL9L{24iN<7=4>QE!z2}QO^NyK|?&r{hjar zzVm(G`Of#No+?ecZn#`_fvwwrNE6vlT)IROn394`dCRmgBIm6P>+=#rd-#*62qd z+DKF|tBH1-&LdGl&_}5gKPWr#$~G6?iz?n)D;t@q2bJj1_F5Yoo}vf>~jfcFTeSUh@V((+YCUvhy+FP)QI9vLR~&xae)gV$4@B=A8x6WXRxrs>Lxt z%_|5<>{dkW3Er@^P*0znS6j(2+U?3t!%-C1kFh6X32PxWgYJi+2C(F)xe& z7P!-UV5RrK?cBjTx$%|U_^NvX#qLX(%=Te+S6KRJ{FYb6#cT`v^W$drGTu+P95t~m zNw|_Qy8d5nd2vHgR6s*GAZpE+?FkVtuJm*;aW(s>&+IB+H_2WjFHbUp`sb4o47)p# zOE!`n*cVZ~51R)!cCF)|CzvDp&xQpHNd@io_UM`dnWFx?Xv}2R^!5mRshCJ($ferZ zRWXzL)KSx%){DxvRvbyUwbZyxYKt?;ETo5svwSaomyn;zmEC@VANM@!ex23$&Pq?{ zM|GK*h-Li2H<+Qn$$^hWpXRWi!)Xp@*o3;sTbRoPgEO2s%i(Pf=QzB|VV1)?SjxO? zyU)zy9zMqgbB@cokyZC7o8bA-$+IUf4Bc|?_&yZ-I9(c899UKRu08XmRH4_OyLtHQ z!>ge~<%8KEAr2UQgSg(;xmRTgr-ffdizHX=qSX6~EVw*VL*F(kQ%_aJVNn_+)e&o4 z@;`WiFx0p6yFA38Go*ijRDY73!$iMEX0Xy9Cm-UkejizYZ|@EF2@CO81&(V$e*^U; B7rg)g diff --git a/__pycache__/computer.cpython-312.pyc b/__pycache__/computer.cpython-312.pyc index 068b3fc8a34b64c45caea929ba3997cb5fea021f..0829162334210a91d48b659f4537e1587ab86c61 100644 GIT binary patch delta 714 zcmaDY^HYZJG%qg~0}yx%v85SuZ{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++_G44Y*?kAuC z-b6rYR2u@Ev=`YmxMlAOh3e;}cieXZ(M9QMe2%G#UtE@TRko#o-fYFKdCj&UVC*>qnM=Sx4BmjxO(;pxRdp&F(tME3+9G@zg<| z`|j&i{nH%fwAk=8pXiE}eE+pi9v>J!GMqH?J*e@AjF3s%c?f@vV^BSOFM%i~M(h!U zq=mQpiJY8Gx*1s^*|`_CcFnl>CJm-j;FLgxq470-vB z@11S81M$W5)uE-KwRmdHcW@!S9@sOVhW#}SP~-6%CtU6En9UJU;(I7lF83ScnWTdU z;Z${G@S&wzw@cNnn(~U)Au870#Ix!&AIs&H4%LckcmO&Ad|lnadf;C5M=Y^=vF1xA zQ|`j^>_P6rMdX>Jl|MAA-N^c&4~(noLLHHvA3~_?P zyx@`0y#qlJ`*LAo0{gBXjh&H4wj&LXQJ4+Ku*jwGZFaPlLZ$J^bBb=mNl@|{7itx! z6)iheQ1Xf~7SvR_hZfJ}iUm1K5h|y{;WftLtGc!z^$tIduvMoacV_kPy5G!gB+3T} zD5D7E$B^k3)TEgqLB0>J#DhBvYyoS3@GN!86et zcsxgJgbnmipeTaBZT%67)xIeOuGQzJVM-!+{TcOGW9;Hl=f zEH14IyzyEv$3JFaEIxE-d-^0&-2EE+aIxeS#pciCCQd6^4M+PDuB!d88Bh7|gc|14 z=Lgn9^)zBcc>;P`=Gw&#?vm5RGmTE>xLm3dqVz(-UW7kef>>)s>-A0%N||x?#Ld!z zYDOrJyggSCPg-&bl`ZR2*l5L0f$BtRpcTFUw~whaIW?Jhd+{2)mrP2?=?@1#g|KYm z3F0mAZX#;+S)-eK;qyedTP)Ili)1B#0scxn9?6lL;fw6PqkDW(o-Qhfc^*!*B|M{M LR<~&)6i)vFcPV?k diff --git a/computer.py b/computer.py index 79b80c4..71151b1 100644 --- a/computer.py +++ b/computer.py @@ -9,7 +9,7 @@ import pygame from constants import RED, WHITE -def minimax(position, depth, max_player, game, user_color): +def minimax(position, depth, max_player, game, user_color, user_two_color): """ The minimax function is the minimax algorithm for AI to play checkers, and has parameters position, depth, max_player, and game parameters. The function returns the best move for the computer to make. @@ -21,8 +21,8 @@ def minimax(position, depth, max_player, game, user_color): if max_player: maxEval = float('-inf') best_move = None - for move in get_all_moves(position, WHITE, game): - evaluation = minimax(move, depth-1, False, game, user_color)[0] + for move in get_all_moves(position, user_two_color, game): + evaluation = minimax(move, depth-1, False, game, user_color, user_two_color)[0] maxEval = max(maxEval, evaluation) if maxEval == evaluation: best_move = move @@ -32,7 +32,7 @@ def minimax(position, depth, max_player, game, user_color): minEval = float('inf') best_move = None for move in get_all_moves(position, user_color, game): - evaluation = minimax(move, depth-1, True, game, user_color)[0] + evaluation = minimax(move, depth-1, True, game, user_color, user_two_color)[0] minEval = min(minEval, evaluation) if minEval == evaluation: best_move = move diff --git a/game.py b/game.py index 600523e..9624aa4 100644 --- a/game.py +++ b/game.py @@ -12,7 +12,7 @@ class Game: display the piece count, display the player names, update the board, check for a winner, select a piece, move a piece, show available moves, change the turn, get the board, and move an AI piece. """ - def __init__(self, win, color, user_color, player1, player2): + def __init__(self, win, color, user_color, user_two_color, player1, player2): """ The init function initializes the Game class with a window, color, player1, and player2, and sets the turn start time and turn timeout. The text color is set to white, and the urgent text color is set to red. The screen is set to the window size, and the player names are set to player1 and player2. @@ -22,8 +22,9 @@ def __init__(self, win, color, user_color, player1, player2): self.win = win self.color = color self.user_color = user_color + self.user_two_color = user_two_color self.selected = None - self.board = Main_Board(self.color, self.user_color) + self.board = Main_Board(self.color, self.user_color, user_two_color) self.turn = user_color self.valid_moves = {} self.font = pygame.font.Font(None, 36) # Font for rendering text @@ -55,9 +56,9 @@ def display_turn(self): The display turn function displays the current turn on the screen. """ if self.turn == self.user_color: - text = f"Current Turn: {self.user_color}" + text = f"Current Turn: Player One" else: - text = f"Current Turn: WHITE" + text = f"Current Turn: Player Two" text_surface = self.font.render(text, True, self.text_color) self.screen.blit(text_surface, (715, 100)) @@ -153,7 +154,7 @@ def change_turn(self): self.valid_moves = {} self.turn_start_time = pygame.time.get_ticks() # Reset the turn timer if self.turn == self.user_color: - self.turn = WHITE + self.turn = self.user_two_color else: self.turn = self.user_color diff --git a/main.py b/main.py index e9f3681..585c257 100644 --- a/main.py +++ b/main.py @@ -7,24 +7,25 @@ import redditwarp.SYNC # from redditwarp.models.submission_SYNC import Submission as Submission_IO # from redditwarp.models.submission import Submission -import textwrap +import textwrap from SecondMenu import SecondMenu -from constants import BLUE, YELLOW, RED, GREEN +from constants import BLUE, YELLOW, RED, GREEN, BLACK, WHITE, GREY from ScoreManager import ScoreManager from SecondMenu import SecondMenu - pygame.init() -pygame.mixer.init() # initialize pygame mixer for music +pygame.mixer.init() # initialize pygame mixer for music # set up the drawing window -Width, Height = 1000, 700 # updated size +Width, Height = 1000, 700 # updated size screen = pygame.display.set_mode([Width, Height]) -#title of the game for screen +# title of the game for screen pygame.display.set_caption("Checkers+") # background music -tracks = ["music/Track1.mp3", "music/Track2.mp3", "music/Track3.mp3", "music/Track4.mp3", "music/Track5.mp3", "music/Track6.mp3", "music/Track7.mp3", "music/Track8.mp3"] # can add more or delete tracks if we do not like them +tracks = ["music/Track1.mp3", "music/Track2.mp3", "music/Track3.mp3", "music/Track4.mp3", "music/Track5.mp3", + "music/Track6.mp3", "music/Track7.mp3", + "music/Track8.mp3"] # can add more or delete tracks if we do not like them current_track = 0 SONG_END = pygame.USEREVENT + 1 second_menu = SecondMenu(tracks) @@ -36,12 +37,13 @@ def music_loop(): """ global current_track pygame.mixer.music.load(tracks[current_track]) - pygame.mixer.music.set_volume(0.1) # 0.1-1.0 + pygame.mixer.music.set_volume(0.1) # 0.1-1.0 pygame.mixer.music.play() current_track = (current_track + 1) % len(tracks) + music_loop() -pygame.mixer.music.set_endevent(SONG_END) # create event for song ending/looping +pygame.mixer.music.set_endevent(SONG_END) # create event for song ending/looping # title for display game_title = "Checkers+" @@ -49,7 +51,7 @@ def music_loop(): credits1 = "Developed by Wander Cerda-Torres, Barry Lin," credits2 = "Nathan McCourt, Jonathan Stanczak, and Geonhee Yu" background_image = pygame.image.load("checkers.jpg") -background_image = pygame.transform.scale(background_image, (Width, Height)) +background_image = pygame.transform.scale(background_image, (Width, Height)) title_font = pygame.font.Font(None, 64) message_font = pygame.font.Font(None, 32) credits_font = pygame.font.Font(None, 25) @@ -67,6 +69,8 @@ def music_loop(): credits_rect2 = credits_text2.get_rect(center=(Width // 2, 670)) second_menu_instance = SecondMenu(tracks) + + def main(): """ The main function is the main menu of the game. It displays the title, message, and credits, and holds user interaction with buttons. @@ -81,13 +85,14 @@ def main(): running = False elif event.type == pygame.MOUSEBUTTONDOWN: buttons = menu_buttons() - if buttons[0].collidepoint(event.pos): # If Start Game button is clicked, show the second menu - second_menu_instance.start_game_menu() - if buttons[2].collidepoint(event.pos): # if mouse is clicked on tutorial button + if buttons[0].collidepoint(event.pos): # If Start Game button is clicked, show the second menu + second_menu_instance.start_game_menu() + if buttons[2].collidepoint(event.pos): # if mouse is clicked on tutorial button tutorial() - elif buttons[1].collidepoint(event.pos): # if mouse is clicked on settings button + elif buttons[1].collidepoint(event.pos): # if mouse is clicked on settings button settings() - elif buttons[4].collidepoint(event.pos): # if mouse is clicked on leaderboard button (not yet implemented) + elif buttons[4].collidepoint( + event.pos): # if mouse is clicked on leaderboard button (not yet implemented) board_customization() elif buttons[5].collidepoint(event.pos): templenews(); @@ -95,20 +100,21 @@ def main(): elif event.type == SONG_END: music_loop() - #image of the background + # image of the background screen.blit(background_image, (0, 0)) # display title information and credits screen.blit(title_text, title_rect) screen.blit(message_text, message_rect) screen.blit(credits_text1, credits_rect1) screen.blit(credits_text2, credits_rect2) - + menu_buttons() pygame.display.flip() # done! time to quit pygame.quit() + def menu_buttons(): """ The menu buttons function creates the buttons on the main menu. It returns the button rectangles for each button so that they can be used in the main function. @@ -122,29 +128,30 @@ def menu_buttons(): startgame_icon = pygame.image.load('pics/start_icon.png') # Draw the icon next to the text with the specified size startgame_icon_resized = pygame.transform.scale(startgame_icon, icon_size) - startgame_icon_rect = startgame_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + (button_height - icon_size[1] - 50) // 2)) + startgame_icon_rect = startgame_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 4 + (button_height - icon_size[1] - 50) // 2)) - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey - position = (Width // 2-150, Height // 4-25) + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey + position = (Width // 2 - 150, Height // 4 - 25) size = (300, 50) # width, height - + button_font = pygame.font.Font(None, 32) - button_text = button_font.render("Start Game", True, (255, 255, 255)) # Button text and color + button_text = button_font.render("Start Game", True, (255, 255, 255)) # Button text and color button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4)) - + # Create button on screen using position and size parameters pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(startgame_icon_resized, startgame_icon_rect.topleft) screen.blit(button_text, button_text_rect) - + # Used to indicate if cursor is hovering over button. If so, button will be darker mouse = pygame.mouse.get_pos() button_rect = pygame.Rect(position, size) if button_rect.collidepoint(mouse): pygame.draw.rect(screen, cursor_color, button_rect) # Change color when cursor hovered over else: - pygame.draw.rect(screen, color, button_rect) # stay original color if cursor not hovering over + pygame.draw.rect(screen, color, button_rect) # stay original color if cursor not hovering over screen.blit(button_text, button_text_rect) screen.blit(startgame_icon_resized, startgame_icon_rect.topleft) # Draw the icon after drawing the button @@ -156,11 +163,13 @@ def menu_buttons(): size = (300, button_height) # width, height button_text = button_font.render("Settings", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + button_height + spacing + button_height // 2)) + button_text_rect = button_text.get_rect( + center=(Width // 2, Height // 4 + button_height + spacing + button_height // 2)) # Draw the icon next to the text with the specified size settings_icon_resized = pygame.transform.scale(settings_icon, icon_size) - settings_icon_rect = settings_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + button_height + spacing + (button_height - icon_size[1]) // 2)) + settings_icon_rect = settings_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 4 + button_height + spacing + (button_height - icon_size[1]) // 2)) # Create button on screen using position and size parameters pygame.draw.rect(screen, color, pygame.Rect(position, size)) @@ -181,57 +190,59 @@ def menu_buttons(): # Tutorial button tutorial_icon = pygame.image.load('pics/tutorial_icon.png') - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey - position = (Width // 2-150, Height // 4 + 135) + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey + position = (Width // 2 - 150, Height // 4 + 135) size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) - button_text = button_font.render("Tutorial", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4+160)) + button_text = button_font.render("Tutorial", True, (255, 255, 255)) # Button text and color + button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 160)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size tutorial_icon_resized = pygame.transform.scale(tutorial_icon, icon_size) - tutorial_icon_rect = tutorial_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 135 + (button_height - icon_size[1]) // 2)) + tutorial_icon_rect = tutorial_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 4 + 135 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) - + # Used to indicate if cursor is hovering over button. If so, button will be darker mouse = pygame.mouse.get_pos() button_rect_3 = pygame.Rect(position, size) if button_rect_3.collidepoint(mouse): pygame.draw.rect(screen, cursor_color, button_rect_3) # Change color when cursor hovered over else: - pygame.draw.rect(screen, color, button_rect_3) # stay original color if cursor not hovering over + pygame.draw.rect(screen, color, button_rect_3) # stay original color if cursor not hovering over screen.blit(tutorial_icon_resized, tutorial_icon_rect.topleft) # Draw the icon after drawing the button screen.blit(button_text, button_text_rect) - + # Leaderboard button leaderboard_icon = pygame.image.load('pics/leaderboard_icon.png') - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey position = (Width // 2 - 150, Height // 4 + 210) # Adjust the vertical position as needed size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) - button_text = button_font.render("View Rankings", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 235)) # Adjust the vertical position as needed + button_text = button_font.render("View Rankings", True, (255, 255, 255)) # Button text and color + button_text_rect = button_text.get_rect( + center=(Width // 2, Height // 4 + 235)) # Adjust the vertical position as needed pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size leaderboard_icon_resized = pygame.transform.scale(leaderboard_icon, icon_size) leaderboard_icon_rect = leaderboard_icon_resized.get_rect( - topleft=(Width // 2 - 150 + 10, Height // 4 + 210 + (button_height - icon_size[1]) // 2)) + topleft=(Width // 2 - 150 + 10, Height // 4 + 210 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) - + # Used to indicate if cursor is hovering over button. If so, button will be darker mouse = pygame.mouse.get_pos() button_rect_4 = pygame.Rect(position, size) @@ -240,7 +251,7 @@ def menu_buttons(): if pygame.mouse.get_pressed()[0]: # Check if left mouse button is clicked show_leaderboard() # Call the function to display the leaderboard else: - pygame.draw.rect(screen, color, button_rect_4) # stay original color if cursor not hovering over + pygame.draw.rect(screen, color, button_rect_4) # stay original color if cursor not hovering over screen.blit(leaderboard_icon_resized, leaderboard_icon_rect.topleft) # Draw the icon after drawing the button screen.blit(button_text, button_text_rect) @@ -248,52 +259,56 @@ def menu_buttons(): # Customize Board button board_icon = pygame.image.load('pics/colorwheel_icon.png') - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey position = (Width // 2 - 150, Height // 4 + 285) # Adjust the vertical position as needed size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) - button_text = button_font.render("Customize Board", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 310)) # Adjust the vertical position as needed + button_text = button_font.render("Customize Board", True, (255, 255, 255)) # Button text and color + button_text_rect = button_text.get_rect( + center=(Width // 2, Height // 4 + 310)) # Adjust the vertical position as needed pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size board_icon_resized = pygame.transform.scale(board_icon, icon_size) - board_icon_rect = board_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 285 + (button_height - icon_size[1]) // 2)) + board_icon_rect = board_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 4 + 285 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) - + # Used to indicate if cursor is hovering over button. If so, button will be darker mouse = pygame.mouse.get_pos() button_rect_5 = pygame.Rect(position, size) if button_rect_5.collidepoint(mouse): pygame.draw.rect(screen, cursor_color, button_rect_5) # Change color when cursor hovered over else: - pygame.draw.rect(screen, color, button_rect_5) # stay original color if cursor not hovering over + pygame.draw.rect(screen, color, button_rect_5) # stay original color if cursor not hovering over screen.blit(board_icon_resized, board_icon_rect.topleft) # Draw the icon after drawing the button screen.blit(button_text, button_text_rect) - #Customize TEMPLE NEWS Button + # Customize TEMPLE NEWS Button board_icon = pygame.image.load('pics/Temple.png') - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey position = (Width // 2 - 150, Height // 4 + 360) # Adjust the vertical position as needed size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) - button_text = button_font.render("TEMPLE NEWS", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 4 + 385)) # Adjust the vertical position as needed + button_text = button_font.render("TEMPLE NEWS", True, (255, 255, 255)) # Button text and color + button_text_rect = button_text.get_rect( + center=(Width // 2, Height // 4 + 385)) # Adjust the vertical position as needed pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) # Draw the icon next to the text with the specified size board_icon_resized = pygame.transform.scale(board_icon, icon_size) - board_icon_rect = board_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 4 + 360 + (button_height - icon_size[1]) // 2)) + board_icon_rect = board_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 4 + 360 + (button_height - icon_size[1]) // 2)) pygame.draw.rect(screen, color, pygame.Rect(position, size)) screen.blit(button_text, button_text_rect) @@ -304,20 +319,20 @@ def menu_buttons(): if button_rect_6.collidepoint(mouse): pygame.draw.rect(screen, cursor_color, button_rect_6) # Change color when cursor hovered over else: - pygame.draw.rect(screen, color, button_rect_6) # stay original color if cursor not hovering over + pygame.draw.rect(screen, color, button_rect_6) # stay original color if cursor not hovering over screen.blit(board_icon_resized, board_icon_rect.topleft) # Draw the icon after drawing the button screen.blit(button_text, button_text_rect) - return button_rect, button_rect_2, button_rect_3, button_rect_4, button_rect_5, button_rect_6 + def templenews(): # load image used in tutorial checkers_icon = pygame.image.load('pics/checkersguy_icon.png') temple_screen = pygame.display.set_mode([Width, Height]) temple_screen.fill((128, 128, 128)) - + # get latest from r/Temple client = redditwarp.SYNC.Client() m = next(client.p.subreddit.pull.top('Temple', amount=1, time='month')) @@ -336,7 +351,7 @@ def templenews(): x = 50; # Draw one line at a time further down the screen for i in wrap_list: - x = x+50 + x = x + 50 temple_font = pygame.font.Font(None, 64) temple_text = temple_font.render(i, True, (255, 255, 255)) temple_rect = temple_text.get_rect(center=(Width // 2, 50 + x)) @@ -347,7 +362,7 @@ def templenews(): wrap_list = my_wrap.wrap(text=reddit_text) # Draw one line at a time further down the screen for i in wrap_list: - x = x+50 + x = x + 50 temple_font = pygame.font.Font(None, 30) temple_text = temple_font.render(i, True, (255, 255, 255)) temple_rect = temple_text.get_rect(center=(Width // 2, 100 + x)) @@ -356,7 +371,6 @@ def templenews(): # Update All Window and contents # pygame.display.update() - # Exit button to return back to menu exit_button_font = pygame.font.Font(None, 32) exit_button_text = exit_button_font.render("Exit To Menu", True, (255, 255, 255)) @@ -377,12 +391,13 @@ def templenews(): elif event.type == SONG_END: music_loop() -def tutorial(): + +def tutorial(): """ The tutorial function displays the tutorial screen. It displays the tutorial text and image, and allows the user to exit the tutorial after clicking the exit button. The tutorial informs the user on how to use the application and what features are available to them. """ - + # load image used in tutorial checkers_icon = pygame.image.load('pics/checkersguy_icon.png') tutorial_screen = pygame.display.set_mode([Width, Height]) @@ -396,22 +411,31 @@ def tutorial(): # Second message tutorial_font = pygame.font.Font(None, 32) - tutorial_text = tutorial_font.render("This tutorial should provide you with instructions on how to play and use Checkers+.", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "This tutorial should provide you with instructions on how to play and use Checkers+.", True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 105)) tutorial_screen.blit(tutorial_text, tutorial_rect) # First paragraph tutorial_font = pygame.font.Font(None, 25) - tutorial_text = tutorial_font.render("There are many features accessible from the Checkers+ menu. You can start a player versus player game, a player", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "There are many features accessible from the Checkers+ menu. You can start a player versus player game, a player", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 145)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("versus computer game, and access features like the settings, leaderboard, board customization, and this tutorial!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "versus computer game, and access features like the settings, leaderboard, board customization, and this tutorial!", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 170)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("The settings will allow you to turn music on or off. You cannot change this once this game starts.", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "The settings will allow you to turn music on or off. You cannot change this once this game starts.", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 195)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("The rankings will show how many points you have as a player, so make sure the name you enter is correct!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "The rankings will show how many points you have as a player, so make sure the name you enter is correct!", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 220)) tutorial_screen.blit(tutorial_text, tutorial_rect) @@ -420,42 +444,64 @@ def tutorial(): button_height = 50 spacing = 10 checkers_icon_resized = pygame.transform.scale(checkers_icon, icon_size) - checkers_icon_rect = checkers_icon_resized.get_rect(topleft=(Width // 2 - 150 + 95, Height // 3+30 + (button_height - icon_size[1]) // 2)) - screen.blit(checkers_icon_resized, checkers_icon_rect.topleft) + checkers_icon_rect = checkers_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 95, Height // 3 + 30 + (button_height - icon_size[1]) // 2)) + screen.blit(checkers_icon_resized, checkers_icon_rect.topleft) # Second paragraph - tutorial_text = tutorial_font.render("To play Checkers+, standard checkers rules are applied...with a twist!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render("To play Checkers+, standard checkers rules are applied...with a twist!", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 365)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("You only have 5 seconds to make a move, so act fast! If you do not make a move within 5 seconds, ", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "You only have 5 seconds to make a move, so act fast! If you do not make a move within 5 seconds, ", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 390)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("you will lose your turn. Clicking on a piece will display available moves for that piece.", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "you will lose your turn. Clicking on a piece will display available moves for that piece.", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 415)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("Like standard checkers, once a piece reaches the opposing player's last row, that piece will become a king.", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "Like standard checkers, once a piece reaches the opposing player's last row, that piece will become a king.", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 440)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("This is indicated by a crown symbol that will display on the piece. Remember, you can move this piece backwards now!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "This is indicated by a crown symbol that will display on the piece. Remember, you can move this piece backwards now!", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 465)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("When the game starts, you will be asked to enter the names of the players (or player, if playing against the computer).", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "When the game starts, you will be asked to enter the names of the players (or player, if playing against the computer).", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 490)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("Doing this will allow your name(s) and score(s) to be updated on your local leaderboard. 50 points for a win, and", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "Doing this will allow your name(s) and score(s) to be updated on your local leaderboard. 50 points for a win, and", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 515)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("-50 points for a loss. However, your first loss of the day will not affect your score, so don't quit if you're off to a bad start!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "-50 points for a loss. However, your first loss of the day will not affect your score, so don't quit if you're off to a bad start!", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 540)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("By now, you should have a basic understanding of what Checkers+ has to offer. Go give it a try!", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "By now, you should have a basic understanding of what Checkers+ has to offer. Go give it a try!", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 565)) tutorial_screen.blit(tutorial_text, tutorial_rect) # Developer note - tutorial_text = tutorial_font.render("Note - Currently there is no button to exit a checkers game early. If you would like to quit,", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "Note - Currently there is no button to exit a checkers game early. If you would like to quit,", True, + (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 590)) tutorial_screen.blit(tutorial_text, tutorial_rect) - tutorial_text = tutorial_font.render("simply close the window by clicking the X in the top right corner. This should return you to the main menu.", True, (255, 255, 255)) + tutorial_text = tutorial_font.render( + "simply close the window by clicking the X in the top right corner. This should return you to the main menu.", + True, (255, 255, 255)) tutorial_rect = tutorial_text.get_rect(center=(Width // 2, 615)) tutorial_screen.blit(tutorial_text, tutorial_rect) @@ -478,7 +524,8 @@ def tutorial(): return # exit tutorial and return to menu elif event.type == SONG_END: music_loop() - + + def settings(): """ The settings function displays the settings screen. It displays the music button that allows the user to stop and play the music. It allows the user to exit @@ -496,9 +543,9 @@ def settings(): settings_screen.blit(credits_text1, credits_rect1) settings_screen.blit(credits_text2, credits_rect2) - color = (128, 128, 128) # grey - cursor_color = (100, 100, 100) # darker grey - position = (Width // 2-150, Height // 3-25) + color = (128, 128, 128) # grey + cursor_color = (100, 100, 100) # darker grey + position = (Width // 2 - 150, Height // 3 - 25) size = (300, 50) # width, height button_font = pygame.font.Font(None, 32) @@ -507,10 +554,12 @@ def settings(): position = (Width // 2 - 150, Height // 3 + button_height + spacing) size = (300, button_height) # width, height button_text = button_font.render("Music (On/Off)", True, (255, 255, 255)) # Button text and color - button_text_rect = button_text.get_rect(center=(Width // 2, Height // 3 + button_height + spacing + button_height // 2)) + button_text_rect = button_text.get_rect( + center=(Width // 2, Height // 3 + button_height + spacing + button_height // 2)) # Draw the icon next to the text with the specified size music_icon_resized = pygame.transform.scale(music_icon, icon_size) - music_icon_rect = music_icon_resized.get_rect(topleft=(Width // 2 - 150 + 10, Height // 3 + button_height + spacing + (button_height - icon_size[1]) // 2)) + music_icon_rect = music_icon_resized.get_rect( + topleft=(Width // 2 - 150 + 10, Height // 3 + button_height + spacing + (button_height - icon_size[1]) // 2)) # Create button on screen using position and size parameters pygame.draw.rect(settings_screen, color, pygame.Rect(position, size)) settings_screen.blit(music_icon_resized, music_icon_rect.topleft) # Draw the icon after drawing the button @@ -544,6 +593,7 @@ def settings(): elif event.type == SONG_END and music_playing == True: music_loop() + def show_leaderboard(): """ The show leaderboard function displays the leaderboard screen. It displays the top ten players and their scores. It allows the user to exit the leaderboard after clicking the @@ -556,7 +606,7 @@ def show_leaderboard(): header_text = header_font.render("Leaderboard", True, (255, 255, 255)) header_rect = header_text.get_rect(center=(500, 40)) leaderboard_screen.blit(header_text, header_rect) - + score_manager = ScoreManager("user_data/user_data.json") # Load scores from the JSON file score_manager.load_scores() @@ -576,7 +626,7 @@ def show_leaderboard(): leaderboard_text_rect = leaderboard_text.get_rect(center=(200, leaderboard_y + i * 30)) leaderboard_text_rect.center = (500, leaderboard_y + i * 30) # Adjust the horizontal position as needed leaderboard_screen.blit(leaderboard_text, leaderboard_text_rect) - + pygame.display.flip() # Exit button to return back to menu @@ -599,7 +649,8 @@ def show_leaderboard(): elif event.type == SONG_END: music_loop() -def board_customization(): + +def board_customization(): """ The board customization function displays the board customization screen. It allows the user to change the color of the board to red, blue, yellow, or green. It allows the user to exit the board customization after clicking the exit button. @@ -623,7 +674,7 @@ def board_customization(): # Board Color Text board_color_font = pygame.font.Font(None, 32) board_color_text = board_color_font.render("Board Color", True, (255, 255, 255)) - text_rect = board_color_text.get_rect(center=(Width // 2 - 200, Height // 3 + 80)) + text_rect = board_color_text.get_rect(center=(Width // 2 - 200, Height // 3 + 10)) # Enlarge the box behind the text box_width = text_rect.width + 40 # Increase width box_height = text_rect.height + 20 # Increase height @@ -631,7 +682,7 @@ def board_customization(): # Draw the enlarged box behind the text pygame.draw.rect(board_customization_screen, (128, 128, 128), box_rect) board_customization_screen.blit(board_color_text, text_rect) - + # Board Color Rectangles board_square_side = 50 # Size of the square board_red_square_rect = pygame.Rect(text_rect.right + 50, text_rect.centery - board_square_side // 2, @@ -647,10 +698,10 @@ def board_customization(): board_square_side, board_square_side) pygame.draw.rect(board_customization_screen, GREEN, board_green_square_rect) # Green square - # User Checker Color Text + # Player One Checker Color Text user_checker_font = pygame.font.Font(None, 32) user_checker_text = user_checker_font.render("Player One Checker Color", True, (255, 255, 255)) - user_checker_rect = user_checker_text.get_rect(center=(Width // 2 - 240, Height // 3 + 150)) + user_checker_rect = user_checker_text.get_rect(center=(Width // 2 - 240, Height // 3 + 80)) # Enlarge the box behind the text user_checker_box_width = user_checker_rect.width + 40 # Increase width user_checker_box_height = user_checker_rect.height + 20 # Increase height @@ -660,10 +711,16 @@ def board_customization(): pygame.draw.rect(board_customization_screen, (128, 128, 128), user_checker_box_rect) board_customization_screen.blit(user_checker_text, user_checker_rect) - # User Checker Color Rectangles + # Player One Checker Color Rectangles user_square_side = 50 # Size of the square - user_red_square_rect = pygame.Rect(user_checker_rect.right + 50, user_checker_rect.centery - user_square_side // 2, - user_square_side, user_square_side) + user_black_square_rect = pygame.Rect(user_checker_rect.right + 50, user_checker_rect.top, user_square_side, + user_square_side) + pygame.draw.rect(board_customization_screen, GREY, user_black_square_rect) # Black square + user_white_square_rect = pygame.Rect(user_black_square_rect.right + 20, user_black_square_rect.top, + user_square_side, user_square_side) + pygame.draw.rect(board_customization_screen, WHITE, user_white_square_rect) # White square + user_red_square_rect = pygame.Rect(user_white_square_rect.right + 20, user_white_square_rect.centery - + user_square_side // 2, user_square_side, user_square_side) pygame.draw.rect(board_customization_screen, RED, user_red_square_rect) # Red square user_blue_square_rect = pygame.Rect(user_red_square_rect.right + 20, user_red_square_rect.top, user_square_side, user_square_side) @@ -675,6 +732,40 @@ def board_customization(): user_square_side, user_square_side) pygame.draw.rect(board_customization_screen, GREEN, user_green_square_rect) # Green square + # Player Two Checker Color Text + user_two_checker_font = pygame.font.Font(None, 32) + user_two_checker_text = user_two_checker_font.render("Player Two Checker Color", True, (255, 255, 255)) + user_two_checker_rect = user_two_checker_text.get_rect(center=(Width // 2 - 240, Height // 3 + 150)) + # Enlarge the box behind the text + user_two_checker_box_width = user_two_checker_rect.width + 40 # Increase width + user_two_checker_box_height = user_two_checker_rect.height + 20 # Increase height + user_two_checker_box_rect = pygame.Rect(user_two_checker_rect.left - 20, user_two_checker_rect.top - 10, + user_two_checker_box_width, user_two_checker_box_height) + # Draw the enlarged box behind the text + pygame.draw.rect(board_customization_screen, (128, 128, 128), user_two_checker_box_rect) + board_customization_screen.blit(user_two_checker_text, user_two_checker_rect) + + # Player Two Checker Color Rectangles + user_two_square_side = 50 # Size of the square + user_two_black_square_rect = pygame.Rect(user_two_checker_rect.right + 50, user_two_checker_rect.top, + user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, GREY, user_two_black_square_rect) # Black square + user_two_white_square_rect = pygame.Rect(user_two_black_square_rect.right + 20, user_two_black_square_rect.top, + user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, WHITE, user_two_white_square_rect) # White square + user_two_red_square_rect = pygame.Rect(user_two_white_square_rect.right + 20, user_two_white_square_rect.centery - + user_two_square_side // 2, user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, RED, user_two_red_square_rect) # Red square + user_two_blue_square_rect = pygame.Rect(user_two_red_square_rect.right + 20, user_two_red_square_rect.top, + user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, BLUE, user_two_blue_square_rect) # Blue square + user_two_yellow_square_rect = pygame.Rect(user_two_blue_square_rect.right + 20, user_two_blue_square_rect.top, + user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, YELLOW, user_two_yellow_square_rect) # Yellow square + user_two_green_square_rect = pygame.Rect(user_two_yellow_square_rect.right + 20, user_two_yellow_square_rect.top, + user_two_square_side, user_two_square_side) + pygame.draw.rect(board_customization_screen, GREEN, user_two_green_square_rect) # Green square + pygame.display.flip() while True: @@ -685,23 +776,40 @@ def board_customization(): elif event.type == pygame.MOUSEBUTTONDOWN: if exit_button_rect.collidepoint(event.pos): # if exit settings button is clicked return - if board_red_square_rect.collidepoint(event.pos): # make board red + if board_red_square_rect.collidepoint(event.pos): # make board red second_menu_instance.color = RED - if board_blue_square_rect.collidepoint(event.pos): # make board blue + if board_blue_square_rect.collidepoint(event.pos): # make board blue second_menu_instance.color = BLUE - if board_yellow_square_rect.collidepoint(event.pos): # make board yellow + if board_yellow_square_rect.collidepoint(event.pos): # make board yellow second_menu_instance.color = YELLOW - if board_green_square_rect.collidepoint(event.pos): # make board green + if board_green_square_rect.collidepoint(event.pos): # make board green second_menu_instance.color = GREEN - if user_red_square_rect.collidepoint(event.pos): # make user red + if user_black_square_rect.collidepoint(event.pos): # make player one black + second_menu_instance.user_color = BLACK + if user_white_square_rect.collidepoint(event.pos): # make player one white + second_menu_instance.user_color = WHITE + if user_red_square_rect.collidepoint(event.pos): # make player one red second_menu_instance.user_color = RED - if user_blue_square_rect.collidepoint(event.pos): # make user blue + if user_blue_square_rect.collidepoint(event.pos): # make player one blue second_menu_instance.user_color = BLUE - if user_yellow_square_rect.collidepoint(event.pos): # make user yellow + if user_yellow_square_rect.collidepoint(event.pos): # make player one yellow second_menu_instance.user_color = YELLOW - if user_green_square_rect.collidepoint(event.pos): # make user green + if user_green_square_rect.collidepoint(event.pos): # make player one green second_menu_instance.user_color = GREEN + if user_two_black_square_rect.collidepoint(event.pos): # make player two black + second_menu_instance.user_two_color = BLACK + if user_two_white_square_rect.collidepoint(event.pos): # make player two white + second_menu_instance.user_two_color = WHITE + if user_two_red_square_rect.collidepoint(event.pos): # make player two red + second_menu_instance.user_two_color = RED + if user_two_blue_square_rect.collidepoint(event.pos): # make player two blue + second_menu_instance.user_two_color = BLUE + if user_two_yellow_square_rect.collidepoint(event.pos): # make player two yellow + second_menu_instance.user_two_color = YELLOW + if user_two_green_square_rect.collidepoint(event.pos): # make player two green + second_menu_instance.user_two_color = GREEN elif event.type == SONG_END: music_loop() -main() \ No newline at end of file + +main() diff --git a/user_data/user_data.json b/user_data/user_data.json index 22f6fba..a0ef174 100644 --- a/user_data/user_data.json +++ b/user_data/user_data.json @@ -1 +1 @@ -{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50, "ryan": 0, "matt": 100, "matt2": 0} \ No newline at end of file +{"Nate": 100, "Checkers Master": 250, "Pey": 150, "ry": 50, "ryan": 0, "matt": 200, "matt2": 50} \ No newline at end of file