From nobody Mon Oct 28 12:44:12 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XcY3w6k5Nz5bK6L; Mon, 28 Oct 2024 12:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XcY3w43yRz4WGG; Mon, 28 Oct 2024 12:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730119452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVHCj5J3soNpQTuCsVKcyqAVaNWzFlxhfjvnhE97gyY=; b=wHRys5/AyQlXl/GnaCRaUG+JgmJM/EpW9oKrv/vBn/5Ywl12l7wmQIajdjMm4CgenHcLY2 Eqd2/ss9SV6hZ7vTSd49G5VMmgvSCkJMv6/n/8504t/zMW+Q8bmvaSUWjJsFzQRc1BLviF Ndl8gmS6H/DyU6AuxFph7cNtd1KahILssH7Zqfnko2NoaNqR/vK5Os4qwlvcyigqnump/2 2lDXY5c8RRAX2cOFJsjd+toJjLiIyYKHJd4zGwpXI3tAxFG+4I5sih6ji5BQqS2tFBuE8o yghvip1oAwvyOnrRPPCX5mr8l1WNKzekAGWvuqTrTBieSwet5xCCQtgEOosb4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730119452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zVHCj5J3soNpQTuCsVKcyqAVaNWzFlxhfjvnhE97gyY=; b=ldevUjZQIXBAmYgToq9NDmxR2e614v7ppr839V1DG8PNbwdntF7aG79OGoKVGoNQpfdqAD Kcf/ArGdV6LXZtoT9yjrHvj4QaOH6rjBO6mpF3F62Q9BXO/ce+9sREGbrPF2x3OeCp25cv O3e/wVfeTIo31dWt+iF4k1LKrSgrVdJynLSLPeuZs7HgU4TiSLPIKJkP27gCm+pMsu0e9b 2FuxN8XVVSoRSw5wKIwrGwRlT853EoSM1hvc/Y9zxXHnOwTTPFbyzdmN8AFxsS3amj+kFm UyFgukSepxyGLz1PHSAWP1i2q1vrRCLKqFfNahZyUl98WmFIsda2wRjPng/Sqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730119452; a=rsa-sha256; cv=none; b=C+Hd10spjkmuMlrUdyvOZ+bbaKAeYh+BoxsROC40FLhOYjiT6iaEwGR8gNmhKCJ+Meb48R JUa3VZNCb0gzBS/baOl/6vwIaA3Fckngkicq1ZLgwcQKRP2ICsrQoLSzl7U8pq+9UhMhx/ OeUz8h7BmR8FYc3dv1Tt5f1qkTxPJu8tkNS/luaSWEG50GU/yv/NSCKHPULoTno3ITAZzo eHas45BIa/tNnhuulCLz6MpPY8IkrCp857wTrPzHpJEpmJR5PYuFDQ5H2+Em4D3jc8tJyt /txsQYC1V/Wk0NnaK4wBV2Qy9GVWBVsaQ92zD7YX2r0hdt75oDD5OMqQ/+1NOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XcY3w3RRdzdn5; Mon, 28 Oct 2024 12:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49SCiCiB073952; Mon, 28 Oct 2024 12:44:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49SCiCkK073949; Mon, 28 Oct 2024 12:44:12 GMT (envelope-from git) Date: Mon, 28 Oct 2024 12:44:12 GMT Message-Id: <202410281244.49SCiCkK073949@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 18c77415cbe2 - main - games/mastermind: traditional console-based mastermind game List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18c77415cbe281f35cfba61905305e0706dad3bd Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=18c77415cbe281f35cfba61905305e0706dad3bd commit 18c77415cbe281f35cfba61905305e0706dad3bd Author: Qiang Guo AuthorDate: 2024-10-25 20:39:55 +0000 Commit: Robert Clausecker CommitDate: 2024-10-28 12:41:57 +0000 games/mastermind: traditional console-based mastermind game This is a traditional console-based Mastermind game. The rules are as follows: 1. The game will generate a 4-digit color/number code 2. The range of colors/numbers is from 1 to 8 3. The player has 10 chances to guess the code 4. After each guess, the system will provide hints: - Green plus sign (+) indicates both color and position are correct - Red minus sign (-) indicates the color is correct but the position is wrong 5. The player needs to gradually guess the correct code based on the hints 6. During the game, you can enter 'r' at any time to switch display mode (color blocks/numbers) 7. During the game, you can enter 'q' at any time to exit the game WWW: https://github.com/bigdragonsoft/mastermind --- games/Makefile | 1 + games/mastermind/Makefile | 27 +++++++++++++++++++++++++++ games/mastermind/distinfo | 3 +++ games/mastermind/pkg-descr | 11 +++++++++++ 4 files changed, 42 insertions(+) diff --git a/games/Makefile b/games/Makefile index f1374694258d..9b56d520fed1 100644 --- a/games/Makefile +++ b/games/Makefile @@ -613,6 +613,7 @@ SUBDIR += mangband SUBDIR += marblemarcher SUBDIR += mari0 + SUBDIR += mastermind SUBDIR += masterserver SUBDIR += maxr SUBDIR += meandmyshadow diff --git a/games/mastermind/Makefile b/games/mastermind/Makefile new file mode 100644 index 000000000000..6c44e78d3d47 --- /dev/null +++ b/games/mastermind/Makefile @@ -0,0 +1,27 @@ +PORTNAME= mastermind +DISTVERSION= 0.1.0 +CATEGORIES= games + +MAINTAINER= bigdragonsoft@gmail.com +COMMENT= Traditional console-based Mastermind game +WWW= https://github.com/bigdragonsoft/mastermind + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USE_GITHUB= yes +GH_ACCOUNT= bigdragonsoft + +CFLAGS+= -std=c99 + +PLIST_FILES= bin/mastermind \ + share/man/man6/mastermind.6.gz + +do-build: + ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o ${WRKSRC}/mastermind ${WRKSRC}/mastermind.c ${LIBS} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/mastermind ${STAGEDIR}${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/mastermind.6 ${STAGEDIR}${PREFIX}/share/man/man6/ + +.include diff --git a/games/mastermind/distinfo b/games/mastermind/distinfo new file mode 100644 index 000000000000..9b7189c5c3d6 --- /dev/null +++ b/games/mastermind/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1729888458 +SHA256 (bigdragonsoft-mastermind-0.1.0_GH0.tar.gz) = 88d3ea65b8b2a7c1089cd429e5c9d817c56428140be91527991c7968f967753b +SIZE (bigdragonsoft-mastermind-0.1.0_GH0.tar.gz) = 87698 diff --git a/games/mastermind/pkg-descr b/games/mastermind/pkg-descr new file mode 100644 index 000000000000..3b0feac91fc8 --- /dev/null +++ b/games/mastermind/pkg-descr @@ -0,0 +1,11 @@ +This is a traditional console-based Mastermind game. The rules are as follows: +1. The game will generate a 4-digit color/number code +2. The range of colors/numbers is from 1 to 8 +3. The player has 10 chances to guess the code +4. After each guess, the system will provide hints: + - Green plus sign (+) indicates both color and position are correct + - Red minus sign (-) indicates the color is correct but the position is wrong +5. The player needs to gradually guess the correct code based on the hints +6. During the game, you can enter 'r' at any time to switch display mode + (color blocks/numbers) +7. During the game, you can enter 'q' at any time to exit the game