Fixed #917 (#922)

Fixed #917 (#922)

HAI 1.2
    HOW IZ I ABZ YR NUM
        DIFFRINT NUM AN BIGGR OF NUM AN 0, O RLY?
            YA RLY, FOUND YR DIFF OF 0 AN NUM
            NO WAI, FOUND YR NUM
        OIC
    IF U SAY SO

    HOW IZ I UKLIDMOD YR NUM1 AN YR NUM2
        NUM1 R I IZ ABZ YR NUM1 MKAY
        NUM2 R I IZ ABZ YR NUM2 MKAY

        IM IN YR LOOP
            BOTH SAEM NUM2 AN 0, O RLY?
                YA RLY, FOUND YR NUM1
            OIC

            I HAS A TMP ITZ NUM2
            NUM2 R MOD OF NUM1 AN NUM2
            NUM1 R TMP
        IM OUTTA YR LOOP

    IF U SAY SO

    HOW IZ I UKLIDSUP YR NUM1 AN YR NUM2
        NUM1 R I IZ ABZ YR NUM1 MKAY
        NUM2 R I IZ ABZ YR NUM2 MKAY

        IM IN YR LOOP
            BOTH SAEM NUM1 AN NUM2, O RLY?
                YA RLY, FOUND YR NUM1
            OIC

            DIFFRINT NUM1 AN SMALLR OF NUM1 AN NUM2, O RLY?
                YA RLY, NUM1 R DIFF OF NUM1 AN NUM2
                NO WAI, NUM2 R DIFF OF NUM2 AN NUM1
            OIC
        IM OUTTA YR LOOP

    IF U SAY SO

    I HAS A CHECK1 ITZ I IZ UKLIDMOD YR PRODUKT OF 64 AN 67 AN YR PRODUKT OF 64 AN 81 MKAY
    I HAS A CHECK2 ITZ I IZ UKLIDSUP YR PRODUKT OF 128 AN 12  AN YR PRODUKT OF 128 AN 77 MKAY

    VISIBLE CHECK1
    VISIBLE CHECK2
KTHXBYE

HAI 1.2
    HOW IZ I ABZ YR NUM
        DIFFRINT NUM AN BIGGR OF NUM AN 0, O RLY?
            YA RLY, FOUND YR DIFF OF 0 AN NUM
            NO WAI, FOUND YR NUM
        OIC
    IF U SAY SO

    HOW IZ I UKLIDMOD YR NUM1 AN YR NUM2
        NUM1 R I IZ ABZ YR NUM1 MKAY
        NUM2 R I IZ ABZ YR NUM2 MKAY

        IM IN YR LOOP
            BOTH SAEM NUM2 AN 0, O RLY?
                YA RLY, FOUND YR NUM1
            OIC

            I HAS A TMP ITZ NUM2
            NUM2 R MOD OF NUM1 AN NUM2
            NUM1 R TMP
        IM OUTTA YR LOOP

    IF U SAY SO

    HOW IZ I UKLIDSUP YR NUM1 AN YR NUM2
        NUM1 R I IZ ABZ YR NUM1 MKAY
        NUM2 R EI IZ ABZ YR NUM2 MKAY

        IM IN YR LOOP
            BOTH SAEM NUM1 AN NUM2, O RLY?
                YA RLY, FOUND YR NUM1
            OIC

            DIFFRINT NUM1 AN SMALLR OF NUM1 AN NUM2, O RLY?
                YA RLY, NUM1 R DIFF OF NUM1 AN NUM2
                NO WAI, NUM2 R DIFF OF NUM2 AN NUM1
            OIC
        IM OUTTA YR LOOP

    IF U SAY SO

    I HAS A CHECK1 ITZ I IZ UKLIDMOD YR PRODUKT OF 64 AN 67 AN YR PRODUKT OF 64 AN 81 MKAY
    I HAS A CHECK2 ITZ I IZ UKLIDSUP YR PRODUKT OF 128 AN 12  AN YR PRODUKT OF 128 AN 77 MKAY

    VISIBLE CHECK1
    VISIBLE CHECK2
KTHXBYE


english locale added

english locale added

<openPost 'Open post'>
<showFavorites 'Show favorite posts'>
<closeApp 'Close Applicaton'>
<chooseGroup 'Choose group'>
<openPostNumber 'Number of post to open'
<numerLimit 'You must enter a number between  0 and'>
<selectPostToDelete 'Select the posts to remove from favorites'>
<followPost 'Add to favorites'>
<unfollowPost 'Remove from favorites'>
<openPostInBrowser 'Open post in the browser'>
<backList 'Back to the list'>
<menu 'Menu'>
<addedPost 'added new post'>
<commentedFollowPost 'commented favorite post'>
<other 'others'>
<likePost 'liked post'>
<commentedPost 'commented on post:'>
<newLikedComment 'New like on a comment'>
<quantityPosts 'Number of posts:'>
<numberPost 'Post number: '>
<author 'Author:'>
<content 'Content:'>
<likes 'Likes:'>
<comments 'Comments:'>
<none 'none...'>
<deleteAll 'Delete all'>
<back 'Back'>

<openPost 'Open post'>
<showFavorites 'Show favorite posts'>
<closeApp 'Close Applicaton'>
<chooseGroup 'Choose group'>
<openPostNumber 'Number of post to open'
<numerLimit 'You must enter a number between  0 and'>
<selectPostToDelete 'Select the posts to remove from favorites'>
<followPost 'Add to favorites'>
<unfollowPost 'Remove from favorites'>
<openPostInBrowser 'Open post in the browser'>
<backList 'Back to the list'>
<menu 'Menu'>
<addedPost 'added new post'>
<commentedFollowPost 'commented favorite post'>
<other 'others'>
<likePost 'liked post'>
<commentedPost 'commented on post:'>
<newLikedComment 'New like on a comment'>
<quantityPosts 'Number of posts:'>
<numberPost 'Number of the post: '>
<author 'Author:'>
<content 'Contents:'>
<likes 'Likes:'>
<comments 'Comments:'>
<none 'none...'>
<deleteAll 'Delete all'>
<back 'Back'>


Delete .lol

Delete .lol


Added binary search algorithm implementation in lolcode

HAI 1.3
	BTW creates test array
	HOW IZ I createTestArray YR n
		I HAS A arr ITZ A BUKKIT
		n IS NOW A NUMBR

		VISIBLE "TESTING ARRAY WITH DA SIZE: " n
		IM IN YR loop UPPIN YR i TIL BOTH SAEM i AN n
			I HAS A numb ITZ PRODUKT OF i AN 2
			arr HAS A SRS i ITZ numb
			VISIBLE numb
		IM OUTTA YR loop

		FOUND YR arr
	IF U SAY SO

	BTW creates array of size n and populates it with given numbers
	HOW IZ I createArray YR n
		I HAS A arr ITZ A BUKKIT
		n IS NOW A NUMBR
		IM IN YR loop UPPIN YR i TIL BOTH SAEM i AN n
			I HAS A numb ITZ A NUMBR
			VISIBLE "GIMMEH NUMBA#" i ": "
			GIMMEH numb
			arr HAS A SRS i ITZ numb
		IM OUTTA YR loop

		FOUND YR arr
	IF U SAY SO

	BTW checks if array is sorted and returns 1 if it is, 0 otherwise
	HOW IZ I checkSorted YR arr AN YR n
		n IS NOW A NUMBR
		n R DIFF OF n AN 1

		IM IN YR loop UPPIN YR i TIL BOTH SAEM i AN n
			I HAS A nextId ITZ SUM OF i AN 1
			I HAS A curr ITZ arr'Z SRS i
			I HAS A next ITZ arr'Z SRS nextId

			curr IS NOW A NUMBR
			next IS NOW A NUMBR

			I HAS A max ITZ BIGGR OF curr AN next
			BOTH SAEM max AN curr
			O RLY?
				YA RLY
					FOUND YR FAIL
			OIC

		IM OUTTA YR loop

		FOUND YR WIN
	IF U SAY SO

	BTW searches through the list
	HOW IZ I binarySearch YR arr AN YR low AN YR high AN YR searching AN YR recId
		BOTH SAEM low AN high
		O RLY?
			BTW low = high
			YA RLY
				I HAS A curr ITZ arr'Z SRS low
				curr IS NOW A NUMBR
				BOTH SAEM curr AN searching
				O RLY?
					YA RLY
						BTW arr[low] = searching
						FOUND YR low
					NO WAI
						FOUND YR -1
				OIC
			BTW else
			NO WAI
				I HAS A max ITZ BIGGR OF low AN high
				BOTH OF max AN high
				O RLY?
					BTW high > low
					YA RLY
						I HAS A sum ITZ SUM OF low AN high
						I HAS A mid ITZ QUOSHUNT OF sum AN 2
						mid IS NOW A NUMBR

						BTW get arr[mid]
						I HAS A curr ITZ arr'Z SRS mid
						curr IS NOW A NUMBR

						BOTH SAEM curr AN searching
						O RLY?
							BTW arr[mid] = searching
							YA RLY
								FOUND YR mid
							NO WAI
								I HAS A max ITZ BIGGR OF curr AN searching
								BTW arr[mid] > searching
								BOTH SAEM max AN curr
								O RLY?
									YA RLY
										I HAS A higher ITZ DIFF OF mid AN 1
										I HAS A result ITZ I IZ binarySearch YR arr AN YR low AN YR higher AN YR search AN YR recId MKAY
										FOUND YR result
									NO WAI
										I HAS A lower ITZ SUM OF mid AN 1
										I HAS A result ITZ I IZ binarySearch YR arr AN YR lower AN YR high AN YR search AN YR recId MKAY
										FOUND YR result
								OIC
						OIC
					NO WAI
						FOUND YR -1
				OIC
		OIC
	IF U SAY SO

	BTW prepares variables
	I HAS A n ITZ 0
	I HAS A arr ITZ A BUKKIT
	I HAS A search

	VISIBLE "GIMMEH SORTED ARRAY SIZE (GIMMEH -1 TO TEST MISELF): "
	GIMMEH n
	n IS NOW A NUMBR

	BOTH SAEM n AN -1
	O RLY?
		BTW automated testing part
		YA RLY
			n R 10
			arr R I IZ createTestArray YR n MKAY
			VISIBLE ""

			search R 14
			VISIBLE "SEARCH VALUE = 14"
			search IS NOW A NUMBR
		BTW user interacted part
		NO WAI
			arr R I IZ createArray YR n MKAY
			VISIBLE ""

			VISIBLE "GIMMEH VALUE TO SEARCH: "
			GIMMEH search
			search IS NOW A NUMBR

	OIC

	I HAS A sorted ITZ I IZ checkSorted YR arr AN YR n MKAY
	BOTH SAEM sorted AN WIN
	O RLY?
		BTW if the array is sorted
		YA RLY
			I HAS A highEnd ITZ DIFF OF n AN 1
			I HAS A resId ITZ I IZ binarySearch YR arr AN YR 0 AN YR highEnd AN YR search AN YR 0 MKAY

			BTW prints result
			BOTH SAEM resId AN -1
			O RLY?
				YA RLY
					VISIBLE "COULD NOT FIND " search " IN DA ARRAY..."
				NO WAI
					I HAS A curr ITZ arr'Z SRS resId
					curr IS NOW A NUMBR
					VISIBLE "" search " WAS #" resId " IN DA ARRAY"
			OIC
		NO WAI
			VISIBLE "DA GIVEN ARRAY IS NOT SORTED!"
	OIC
KTHXBYE

error: pathspec 'search/binary_search/LOLCODE/binary_search.lol' did not match any file(s) known to git


Add LOLCODE tic-tac-toe

Add LOLCODE tic-tac-toe

Formerly in repo https://github.com/Joimer/Tic-Tac-Lol

HAI 1.2
  CAN HAS STDIO?

  BTW Welcome the user to the game.
  VISIBLE "Welcome to Tic-Tac-Toe!"

  BTW One variable for each square on the tic-tac-toe-board because we don't have arrays yet ;_;
  I HAS A one_one ITZ "_" BTW This is the upper-leftmost square
  I HAS A one_two ITZ "_" BTW This is the upper-mid square
  I HAS A one_three ITZ "_" BTW This is the upper-rightmost square
  I HAS A two_one ITZ "_" BTW This is the mid-leftmost square
  I HAS A two_two ITZ "_" BTW This is the mid-mid square
  I HAS A two_three ITZ "_" BTW This is the mid-rightmost square
  I HAS A three_one ITZ "_" BTW This is the bottom-leftmost square
  I HAS A three_two ITZ "_" BTW This is the bottom-mid square
  I HAS A three_three ITZ "_" BTW This is the bottom-rightmost square
  I HAS A player_won ITZ FAIL
  I HAS A free_places ITZ 9
  I HAS A game_status ITZ 1 BTW 1 is tie, 2 is cpu win. Player can't win lol.

  BTW This is the main game loop.
  IM IN YR tictactoegame
  	BTW Printing the board state.
  	VISIBLE "|" AN one_one AN "|" AN one_two AN "|" AN one_three AN "|:)|" AN two_one AN "|" AN two_two AN "|" AN two_three AN "|:)|" AN three_one AN "|" AN three_two AN "|" AN three_three AN "|"

  	BTW Check if the game has been won.
  	BOTH SAEM game_status AN 2, O RLY?
  		YA RLY, GTFO
  		NO WAI, BTW Keep playing.
  	OIC

  	BTW Check if we are out of spaces.
  	BOTH SAEM free_places AN 0, O RLY?
  		YA RLY, GTFO
  		NO WAI, BTW Keep playing as well.
  	OIC

  	BTW Define helper variables to get the proper game input.
  	I HAS A opt_row ITZ ""
  	I HAS A opt_column ITZ ""
  	I HAS A com_moves ITZ WIN

  	BTW Ask for the row for the movement.
  	VISIBLE "What is your move? Choose row (1, 2, 3)"
  	GIMMEH opt_row

  	BTW Ask for the column for the movement.
  	VISIBLE "Choose column now (1, 2, 3)"
  	GIMMEH opt_column

	BTW Modify the game board
	BTW Check if the place can be modified
	opt_row, WTF?
		OMG "1"
			opt_column, WTF?
				OMG "1"
					BOTH SAEM one_one AN "_", O RLY?
						YA RLY
							one_one R "X"
							free_places R DIFF OF free_places AN 1

							BTW Check for possible wins.
							BOTH SAEM one_two AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											BTW We don't need to check more for computer move.
											one_three R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM one_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													BTW We don't need to check more for computer move.
													one_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_one AN "X", O RLY?
								YA RLY
									BOTH SAEM three_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_one AN "X", O RLY?
								YA RLY
									BOTH SAEM two_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "2"
					BOTH SAEM one_two AN "_", O RLY?
						YA RLY
							one_two R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM one_one AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											one_three R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM one_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_two AN "X", O RLY?
								YA RLY
									BOTH SAEM three_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_two AN "X", O RLY?
								YA RLY
									BOTH SAEM two_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "3"
					BOTH SAEM one_three AN "_", O RLY?
						YA RLY
							one_three R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM one_one AN "X", O RLY?
								YA RLY
									BOTH SAEM one_two AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											one_two R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_two AN "X", O RLY?
								YA RLY
									BOTH SAEM one_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMGWTF
					VISIBLE "Wrong column input!"
					com_moves R FAIL
			OIC
			GTFO
		OMG "2"
			opt_column, WTF?
				OMG "1"
					BOTH SAEM two_one AN "_", O RLY?
						YA RLY
							two_one R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM two_three AN "X", O RLY?
								YA RLY
									BOTH SAEM two_two AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											two_two R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_two AN "X", O RLY?
								YA RLY
									BOTH SAEM two_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_one AN "X", O RLY?
								YA RLY
									BOTH SAEM three_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_one AN "X", O RLY?
								YA RLY
									BOTH SAEM one_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "2"
					BOTH SAEM two_two AN "_", O RLY?
						YA RLY
							two_two R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM one_one AN "X", O RLY?
								YA RLY
									BOTH SAEM three_three AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											three_three R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_one AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_three AN "X", O RLY?
								YA RLY
									BOTH SAEM one_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "3"
					BOTH SAEM two_three AN "_", O RLY?
						YA RLY
							two_three R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM three_three AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											one_three R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_two AN "X", O RLY?
								YA RLY
									BOTH SAEM two_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_one AN "X", O RLY?
								YA RLY
									BOTH SAEM two_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMGWTF
					VISIBLE "Wrong column input!"
			OIC
			GTFO
		OMG "3"
			opt_column, WTF?
				OMG "1"
					BOTH SAEM three_one AN "_", O RLY?
						YA RLY
							three_one R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM three_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_two AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											three_two R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_two AN "X", O RLY?
								YA RLY
									BOTH SAEM three_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_one AN "X", O RLY?
								YA RLY
									BOTH SAEM two_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_one AN "X", O RLY?
								YA RLY
									BOTH SAEM one_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM two_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_two AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "2"
					BOTH SAEM three_two AN "_", O RLY?
						YA RLY
							three_two R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM three_one AN "X", O RLY?
								YA RLY
									BOTH SAEM three_three AN "_", O RLY?
										YA RLY
											com_moves R FAIL
											three_three R "O"
											free_places R DIFF OF free_places AN 1
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_three AN "X", O RLY?
								YA RLY
									BOTH SAEM three_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_two AN "X", O RLY?
								YA RLY
									BOTH SAEM one_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_two AN "X", O RLY?
								YA RLY
									BOTH SAEM two_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMG "3"
					BOTH SAEM three_three AN "_", O RLY?
						YA RLY
							three_three R "X"
							free_places R DIFF OF free_places AN 1

							BOTH SAEM three_two AN "X", O RLY?
								YA RLY
									BOTH SAEM three_one AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_one R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM three_one AN "X", O RLY?
								YA RLY
									BOTH SAEM three_two AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													three_two R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM two_three AN "X", O RLY?
								YA RLY
									BOTH SAEM one_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													one_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
							BOTH SAEM one_three AN "X", O RLY?
								YA RLY
									BOTH SAEM two_three AN "_", O RLY?
										YA RLY
											BOTH SAEM com_moves AN WIN, O RLY?
												YA RLY
													com_moves R FAIL
													two_three R "O"
													free_places R DIFF OF free_places AN 1
												NO WAI
											OIC
										NO WAI
									OIC
								NO WAI
							OIC
						NO WAI
							VISIBLE "This place is already taken!"
							com_moves R FAIL
					OIC
					GTFO
				OMGWTF
					VISIBLE "Wrong column input!"
					com_moves R FAIL
			OIC
			GTFO
		OMGWTF
			VISIBLE "Wrong row input!"
			com_moves R FAIL
	OIC

	BTW Computers turn. As the second player, attempt to go for the tie / win always.
	BTW This part is only run when there is no direct counter-tactic in the code above.
	BOTH SAEM com_moves AN WIN, O RLY?
		YA RLY
			BTW First thing to check is the center
			BOTH SAEM two_two AN "_", O RLY?
				YA RLY
					BTW Place it in the center.
					two_two R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM one_one AN "_"
					BTW Next, we are going for a corner. x--,---,---
					one_one R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM three_three AN "_"
					BTW Next corner, let it be opposite one. x--,---,--x
					three_three R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM one_three AN "_"
					BTW  x-x,---,--x
					one_three R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM three_one AN "_"
					BTW  x-x,---,x-x
					three_one R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM two_one AN "_"
					two_one R "O"
					free_places R DIFF OF free_places AN 1
				MEBBE BOTH SAEM two_three AN "_"
					two_three R "O"
					free_places R DIFF OF free_places AN 1
				NO WAI
					BTW We never get there because this BOTH SAEM only deals with move 1 of the machine or at the end.
			OIC
		NO WAI BTW Do nothing
	OIC

	BTW Check for possible Computer wins
	BOTH SAEM one_one AN "O", O RLY?
		YA RLY
			BTW Check for Upper row ooo,---,---
			BOTH SAEM one_two AN "O", O RLY?
				YA RLY
					BOTH SAEM one_three AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
			BTW Check for left column o--,o--,o--
			BOTH SAEM two_one AN "O", O RLY?
				YA RLY
					BOTH SAEM three_one AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
			BTW Check for diagonal left to right o--,-o-,--o
			BOTH SAEM two_two AN "O", O RLY?
				YA RLY
					BOTH SAEM three_three AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
		MEBBE BOTH SAEM two_one AN "O"
			BTW Check for mid row ---,ooo,---
			BOTH SAEM two_two AN "O", O RLY?
				YA RLY
					BOTH SAEM two_three AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
		MEBBE BOTH SAEM three_one AN "O"
			BTW Check for lower row ---,---,ooo
			BOTH SAEM three_two AN "O", O RLY?
				YA RLY
					BOTH SAEM three_three AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
			BTW Check for diagonal --o,-o-,o--
			BOTH SAEM one_three AN "O", O RLY?
				YA RLY
					BOTH SAEM two_two AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
		MEBBE BOTH SAEM three_three AN "O"
			BTW Check for right column --o, --o, --o
			BOTH SAEM one_three AN "O", O RLY?
				YA RLY
					BOTH SAEM two_three AN "O", O RLY?
						YA RLY
							game_status R 2
						NO WAI
					OIC
				NO WAI
			OIC
		NO WAI
	OIC

  IM OUTTA YR tictactoegame

  BTW Who's won?
  VISIBLE "The game has finished!"
  game_status, WTF?
	OMG 1
		VISIBLE "It was a tie!"
		GTFO
	OMG 2
		VISIBLE "The CPU won!"
		GTFO
  OIC
KTHXBYE

error: pathspec 'tictactoe/ttt.lol' did not match any file(s) known to git


Delete lol.lol

Delete lol.lol


Add lolcode solution

Add lolcode solution

HAI 1.4

CAN HAS STRING?

HOW IZ I SPLIT YR SENTENCE AN YR DELIM
  I HAS A NOW ITZ ""
  I HAS A WORDZ ITZ A BUKKIT
  I HAS A POS ITZ 1
  I HAS A LENF
  LENF R I IZ STRING'Z LEN YR SENTENCE MKAY

  IM IN YR FORLOOP UPPIN YR I TIL BOTH SAEM I AN LENF
    I HAS A CHAR ITZ I IZ STRING'Z AT YR SENTENCE AN YR I MKAY
    BOTH SAEM CHAR AN DELIM, O RLY?
      YA RLY
        WORDZ HAS A SRS POS ITZ NOW
        NOW R ""
        POS R SUM OF POS AN 1
      NO WAI
        NOW R SMOOSH NOW AN CHAR MKAY
    OIC
  IM OUTTA YR FORLOOP

  WORDZ'Z POS R NOW
  FOUND YR WORDZ
IF U SAY SO

I HAS A WORDZ ITZ I IZ SPLIT YR "HELLO, WORLD" AN YR "," MKAY

KTHXBYE

error: pathspec 'problems/split_string/split.lol' did not match any file(s) known to git


update the syntax

update the syntax

<plural($n) {$n==0?"none":$n==1?"one":"many"}>

<name "Name">

<name_input
 value: "{{$user.name}}"
 placeholder: "Write your name {{$user.name}}"
 title: "You can give us your nickname if you prefer">

<window_title "Downloading {{$downloadCount}} files">

<download_status[plural($downloadCount)] {
  none: "{{$user.name}} is currently downloading no files.",
  one: "{{$user.name}} is currently downloading one file.",
  many: "{{$user.name}} is currently downloading {{$downloadCount}} files."
}>

<mood[$user.gender] {
  male: "He's happy!",
  female: "She's happy!"
}>

<plural(n) {n==0?"none":n==1?"one":"many"}>

<name "Name">

<name_input
 value: "{{user.name}}"
 placeholder: "Write your name {{user.name}}"
 title: "You can give us your nickname if you prefer">

<window_title "Downloading {{downloadCount}} files">

<download_status[plural(downloadCount)] {
  none: "{{user.name}} is currently downloading no files.",
  one: "{{user.name}} is currently downloading one file.",
  many: "{{user.name}} is currently downloading {{downloadCount}} files."
}>

<mood[user.gender] {
  male: "He's happy!",
  female: "She's happy!"
}>


First LOLCODE example

First LOLCODE example

HAI 1.2
  IM IN YR FIRST UPPIN YR Z TIL BOTH SAEM Z AN 41
    IM IN YR SECOND UPPIN YR Y TIL BOTH SAEM Y AN Z
      IM IN YR THIRD UPPIN YR X TIL BOTH SAEM X AN Y
        I HAS A W ITZ SUM OF PRODUKT OF X AN X AN PRODUKT OF Y AN Y
        BOTH SAEM W AN PRODUKT OF Z AN Z, O RLY?
          YA RLY, VISIBLE X ", " Y ", " Z
        OIC
      IM OUTTA YR THIRD
    IM OUTTA YR SECOND
  IM OUTTA YR FIRST
KTHXBYE

error: pathspec 'lolcode/triple.lol' did not match any file(s) known to git


Add the period I forgot. (LOLCODE)

Add the period I forgot. (LOLCODE)

HAI 1.3
CAN HAS STDIO?
VISIBLE "Fuck you Mendez."
KTHXBYE

HAI 1.3
CAN HAS STDIO?
VISIBLE "Fuck you Mendez"
KTHXBYE


update lolcode version to match online interpreter

HAI

I HAS A VAR ITZ 1

IM IN YR LOOP UPPIN YR VAR
  BOTH SAEM VAR AN 101, O RLY?
    YA RLY, GTFO
  OIC

  BOTH SAEM MOD OF VAR AN 15 AN 0, O RLY?
    YA RLY, VISIBLE "FIZZBUZZ"
    MEBBE BOTH SAEM MOD OF VAR AN 3 AN 0, VISIBLE "FIZZ"
    MEBBE BOTH SAEM MOD OF VAR AN 5 AN 0, VISIBLE "BUZZ"
    NO WAI, VISIBLE VAR
  OIC
IM OUTTA YR LOOP

KTHXBYE

HAI
CAN HAS STDIO?

I HAS A VAR ITZ 0

IM IN YR LOOP
  UPZ VAR!!1

  IZ VAR BIGGER THAN 100?
    GTFO.
  KTHX

  IZ VAR LEFTOVAR IS LIEK 0?
    VISIBLE "FIZZBUZZ"
  KTHX

  ORLY?
  IS VAR LEFTOVAR 3 LIEK 0?
    VISIBLE "FIZZ"
  KTHX

  ORLY?
  IS VAR LEFTOVAR 5 LIEK 0?
    VISIBLE "BUZZ"
  KTHX

  NOWAI
    VISIBLE WAR
  KTHX

KTHX
KTHXBYE


add big test file

add big test file

<entity0[1+2||3-a==3/1*1]
 attr1: "foo">

<entity1[foo(1, 2, 1)-foo(2)+1] "value1">
<entity2[d?s==2:s+2/3] ["value2", ["value2", "value2"]]>
<entity3[d==d?foo(2-1):foo(2*2)] "value3">
<entity4["foo"==f&&"foo2" == 2?d:s] "value4">
<entity5[ 1  + 2 / 3 * 4 == 2 * 2 == 3 > 1 ? foo( 2 / 3) * foo(1&&2): a%10] "value5">
<entity0
 attr1: "foo">

<entity1[foo(1, 2, 1)] "value1">
<entity2[0] ["value2", ["value2", "value2"]]>
<entity3[2] "value3">
<entity4["foo"] "value4">
<entity5 "value5">
<entity6 "value6">
<entity7["dd"] "value7">
<entity8 "value8">
<entity9['dd'] "value9">
<entity11 {a: "value1", b: "value1", c: ["value3"]}>
<entity12[dd] "value2">
<entity13 "value3"
 attr: "value1"
 attr2: "value2">
<entity14[['a','b']] "value4">
<entity15[{a:'b',c:'d'}] "value5">
<entity16[foo()] "value6">
<entity17[foo(a)] "value7">
<entity18[foo("a", a)] "value8">
<entity19[foo({a: 'b'}, ['a', 'b'])] "value9">
<entity21[foo[.a]] "value1">
<entity22[foo[a]] "value2">
<entity23 "value3">
<entity24 "value4">
<entity25 "value5">
<entity26 "value6">
<entity27 "value7">
<entity28 ["value8", "value8"]
 attr1: {a: "value1", b: ["val1", "val2"]}>
<entity29 "value9">
<entity31 "value1">
<entity32 "value2">
<entity33 "value3">
<entity34 "value4">
<entity35 "value5">
<entity36 "value6">
<entity37 "value7">
<entity38 "value8">
<entity39 {a: "value9", b: "value9", c: "value10"}>
<entity41 "value1">
<entity42 "value2">
<entity43 "value3">
<entity44 "value4">
<entity45 "value5">
<entity46 "value6">
<entity47 "value7">
<entity48 "value8">
<entity49 "value9">
<entity50 "value9">

error: pathspec 'tests/data/example1.lol' did not match any file(s) known to git