Python Forum
Connect Four Win Check Function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Connect Four Win Check Function
#7
Essentially, my idea was to check every possible vertical, horizontal and diagonal possibility on the board after a player has "placed" a counter. However, that seems inefficient.

I like your idea, and may try to adapt it, but I'd like to keep my board in strings.

I'll probably do a function with three other functions within it(horizontal win check, vertical.....), and each of those functions will use a nested for loop to detect if the counter that has just been placed, triggers a win.
Reply


Messages In This Thread
RE: Connect Four Win Check Function - by mpd - Jan-04-2018, 01:59 PM
RE: Connect Four Win Check Function - by buran - Jan-04-2018, 02:11 PM
RE: Connect Four Win Check Function - by mpd - Jan-04-2018, 04:14 PM
RE: Connect Four Win Check Function - by ShadowWarrior17 - Jan-04-2018, 05:41 PM
RE: Connect Four Win Check Function - by mpd - Jan-04-2018, 05:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Date format and past date check function Turtle 5 4,475 Oct-22-2021, 09:45 PM
Last Post: deanhystad
  Is there any way to check if a function is user-defined? dullboy 11 10,596 Oct-06-2016, 03:42 AM
Last Post: dullboy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020