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
Results:

Another very successful challenge with 40 entries total and because of no validation, almost every entry passed.

For the first time ever we have three way tie winners (below is in order of submission date).

Winner! jaytea (135 bytes!)
alias tictac {
  %a =
  :)
  inc %b $mid($1,$mid(123456789147258369159357,%a,1),1) 0
  %c = %b / 3
  if 3 // %a {
    %b =
    if 1 // %c return %c
  }
  dec %a
  goto )

Winner! Kol (135 bytes!)
CG
42
2C
1K
7L
21
84
7
0
alias tictac {
  %x =
  :3
  inc %x
  %y = 0
  :%y
  if $replace($base($read($script,%x),36,2,9),0,?,1,%y) iswm $1 return %y
  inc %y
  goto %y

Winner! Chessnut (135 bytes!)
alias tictac {
  %i = 24
  :3
  %o = 0
  while %i {
    %o = $or(%o,$mid($1,$mid(123456789147258369159357,%i,1),1))
    dec %i
    if 3 // %i goto %o
  }
  :%o
  return %o


Top Entries
  •  jaytea
  • 135 bytes
  •  Kol
  • 135 bytes
  •  Chessnut
  • 135 bytes
  •  ohad
  • 144 bytes
  •  patje
  • 144 bytes
  •  Nighthawk
  • 146 bytes
  •  urza
  • 149 bytes
  •  theafien
  • 151 bytes
  •  mQ
  • 161 bytes
  •  chid
  • 162 bytes
  •  Albie
  • 164 bytes
  •  m910q
  • 165 bytes
  •  Suchorski
  • 165 bytes
  •  Auron956
  • 167 bytes
  •  kocam
  • 169 bytes
  •  iorio
  • 170 bytes
  •  Imk0tter
  • 171 bytes
  •  therealkerst
  • 178 bytes
  •  A Noniem
  • 180 bytes
  •  DixrouE
  • 184 bytes
  •  Asterix_UO
  • 194 bytes
  •  checker
  • 195 bytes
  •  zzattack
  • 197 bytes
  •  Colten
  • 198 bytes
  •  pocho the panther
  • 202 bytes
  •  snabbi
  • 203 bytes
  •  jos
  • 218 bytes
  •  Jigsy
  • 225 bytes
  •  bamaboy
  • 242 bytes
  •  WorldDMT2
  • 245 bytes
  •  Natdhib
  • 252 bytes
  •  DiezeL
  • 358 bytes
  •  luxtrike
  • 564 bytes

    Invalid Entries
  •  bindi
  • 42 bytes* Failed on all tests ;)
  •  Kylar
  • 81 bytes* Passes all tests but uses regex -- against the rules. Nice entry though :)
  •  blink
  • 176 bytes* Incomplete entry
  •  myndzi
  • 201 bytes* Couldn't get it working even after adding $qt() :(
  •  WorldDMT
  • 237 bytes* Disqualified because submitted under new name
  •  kopper
  • 262 bytes* Failed on test 28 $tictac(112221112) returned 2 should of returned 0
  •  vliedel
  • 9133 bytes* /hadd: no such table 'tictac' (line 293, vliedel.mrc) -- but fun multiplayer game over mirc

    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)