Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Top Challenge Entrants

  # User Points
  1 jaytea 587
  2 [Znork] 303
  3 urza 297
  4 Ag2X 288
  5 dr_Eamer 255
  6 Albie 199
  7 Chessnut 197
  8 A Noniem 194
  9 zzattack 186
  10 Kol 185
  11 m910q 168
  12 Sephiroth 115
  13 Auron956 114
  14 patje 114
  15 chid 110
  16 Ohad2121 92
  17 SkorpSSS 87
  18 DixrouE 84
  19 Suchorski 83
  20 ^Vampire^ 74
Challenge:Smallest $tictac - Tic, Tac, Toe
Start:July 25th 2009
End:August 1st 2009
Description:

In this challenge you are asked to create an alias that will return the winner of a game of Tic-Tac-Toe.

One parameter will be passed to the alias -- the grid. The grid can consist of the following:

1 for Player 1
2 for Player 2


Specifications


  • Grid will be standard 3x3 size
  • Grid will be passed on one line in the format: [row1][row2][row3]
  • You must return the winning player number;
    - Player 1 wins, return '1'
    - Player 2 wins return '2'
    - Draw return '0'




Validation



You can assume the correct input is always passed to the alias. There is no need for validation in this challenge.

This includes validating if the board/grid makes sense i.e. if there are multiple winners, incorrect characters/length and if $2- is passed. Always assume the correct parameters are passed.

Example:



$tictac(112221211) = 2
$tictac(122111122) = 1
$tictac(019jgaj) = anything you like! no validation required i.e. it won't be tested


Rules:

  • Alias name must be 'tictac'
  • No dlls, coms, sockets or regular expressions
  • One submission per user.
  • Script must give correct results after consecutive runs.


  • Testing conditions:

  • Alias will be run on mIRC v6.35 and loaded into the remotes section.
  • Your code will be taken for EXACTLY as-is.
  • Alias will be run on a mIRC with no variables set - a clean mIRC.


  • Countcode:
    (coded by garreh)